Skip to content

Commit

Permalink
fix: upgrade jsonschema to 0.9.6
Browse files Browse the repository at this point in the history
See api7/jsonschema#62

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander committed Jan 13, 2022
1 parent e8229f5 commit 1e0e479
Show file tree
Hide file tree
Showing 30 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion rockspec/apisix-master-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies = {
"luafilesystem = 1.7.0-2",
"api7-lua-tinyyaml = 0.4.1",
"nginx-lua-prometheus = 0.20210206",
"jsonschema = 0.9.5",
"jsonschema = 0.9.6",
"lua-resty-ipmatcher = 0.6.1",
"lua-resty-kafka = 0.07",
"lua-resty-logger-socket = 2.0-0",
Expand Down
8 changes: 4 additions & 4 deletions t/admin/health-check.t
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"active\" validation failed: property \"healthy\" validation failed: property \"successes\" validation failed: expected 255 to be smaller than 254"}
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"active\" validation failed: property \"healthy\" validation failed: property \"successes\" validation failed: expected 255 to be at most 254"}
Expand All @@ -195,7 +195,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"active\" validation failed: property \"healthy\" validation failed: property \"successes\" validation failed: expected 0 to be greater than 1"}
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"active\" validation failed: property \"healthy\" validation failed: property \"successes\" validation failed: expected 0 to be at least 1"}
Expand All @@ -221,7 +221,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"passive\" validation failed: property \"unhealthy\" validation failed: property \"http_statuses\" validation failed: failed to validate item 2: expected 600 to be smaller than 599"}
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: property \"passive\" validation failed: property \"unhealthy\" validation failed: property \"http_statuses\" validation failed: failed to validate item 2: expected 600 to be at most 599"}
Expand Down Expand Up @@ -436,7 +436,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: object matches none of the requireds: [\"active\"] or [\"active\",\"passive\"]"}
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: object matches none of the required: [\"active\"] or [\"active\",\"passive\"]"}
Expand Down
6 changes: 3 additions & 3 deletions t/admin/routes.t
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"service_id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"service_id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -541,7 +541,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand All @@ -568,7 +568,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream_id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"upstream_id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down
2 changes: 1 addition & 1 deletion t/admin/routes3.t
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"remote_addr\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"remote_addr\" validation failed: object matches none of the required"}
Expand Down
6 changes: 3 additions & 3 deletions t/admin/services-string-id.t
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand All @@ -460,7 +460,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand All @@ -487,7 +487,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream_id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"upstream_id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down
6 changes: 3 additions & 3 deletions t/admin/services.t
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand All @@ -474,7 +474,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand All @@ -501,7 +501,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream_id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"upstream_id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down
8 changes: 4 additions & 4 deletions t/admin/upstream-array-nodes.t
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -383,7 +383,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -415,7 +415,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -447,6 +447,6 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the required"}
--- no_error_log
[error]
8 changes: 4 additions & 4 deletions t/admin/upstream.t
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -374,7 +374,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -506,7 +506,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down Expand Up @@ -536,7 +536,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"nodes\" validation failed: object matches none of the required"}
--- no_error_log
[error]

Expand Down
2 changes: 1 addition & 1 deletion t/admin/upstream2.t
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,6 @@ no valid upstream node
GET /t
--- error_code: 400
--- response_body_like eval
qr/{"error_msg":"invalid configuration: property \\\"timeout\\\" validation failed: property \\\"(connect|send|read)\\\" validation failed: expected 0 to be strictly greater than 0"}/
qr/{"error_msg":"invalid configuration: property \\\"timeout\\\" validation failed: property \\\"(connect|send|read)\\\" validation failed: expected 0 to be greater than 0"}/
--- no_error_log
[error]
2 changes: 1 addition & 1 deletion t/admin/upstream3.t
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ __DATA__
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"retry_timeout\" validation failed: expected -1 to be greater than 0"}
{"error_msg":"invalid configuration: property \"retry_timeout\" validation failed: expected -1 to be at least 0"}
Expand Down
4 changes: 2 additions & 2 deletions t/admin/upstream4.t
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the requireds"}
{"error_msg":"invalid configuration: property \"id\" validation failed: object matches none of the required"}
Expand Down Expand Up @@ -197,7 +197,7 @@ passed
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"retries\" validation failed: expected -1 to be greater than 0"}
{"error_msg":"invalid configuration: property \"retries\" validation failed: expected -1 to be at least 0"}
Expand Down
2 changes: 1 addition & 1 deletion t/node/healthcheck-passive.t
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,4 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: object matches none of the requireds: [\"active\"] or [\"active\",\"passive\"]"}
{"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: object matches none of the required: [\"active\"] or [\"active\",\"passive\"]"}
4 changes: 2 additions & 2 deletions t/node/healthcheck.t
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ qr/unhealthy TCP increment.*foo.com.*127.0.0.1:1988/
--- request
GET /t
--- response_body_like eval
qr/expected 0 to be greater than 1/
qr/expected 0 to be at least 1/
--- error_code chomp
400

Expand Down Expand Up @@ -791,7 +791,7 @@ qr/expected 0 to be greater than 1/
--- request
GET /t
--- response_body_like eval
qr/expected 65536 to be smaller than 65535/
qr/expected 65536 to be at most 65535/
--- error_code chomp
400

Expand Down
2 changes: 1 addition & 1 deletion t/node/upstream-keepalive-pool.t
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ __DATA__
}
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"keepalive_pool\" validation failed: property \"size\" validation failed: expected 0 to be greater than 1"}
{"error_msg":"invalid configuration: property \"keepalive_pool\" validation failed: property \"size\" validation failed: expected 0 to be at least 1"}
Expand Down
2 changes: 1 addition & 1 deletion t/plugin/api-breaker.t
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin api-breaker err: property \"break_response_code\" validation failed: expected 199 to be greater than 200"}
{"error_msg":"failed to check the configuration of plugin api-breaker err: property \"break_response_code\" validation failed: expected 199 to be at least 200"}
--- no_error_log
[error]

Expand Down
6 changes: 3 additions & 3 deletions t/plugin/authz-keycloak.t
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ done
--- request
GET /t
--- response_body
allOf 1 failed: object matches none of the requireds: ["discovery"] or ["token_endpoint"]
allOf 1 failed: object matches none of the required: ["discovery"] or ["token_endpoint"]
done
--- no_error_log
[error]
Expand All @@ -231,7 +231,7 @@ done
--- request
GET /t
--- response_body
allOf 2 failed: object matches none of the requireds: ["client_id"] or ["audience"]
allOf 2 failed: object matches none of the required: ["client_id"] or ["audience"]
done
--- no_error_log
[error]
Expand All @@ -258,7 +258,7 @@ done
--- request
GET /t
--- response_body
allOf 3 failed: object matches none of the requireds
allOf 3 failed: object matches none of the required
done
--- no_error_log
[error]
Expand Down
4 changes: 2 additions & 2 deletions t/plugin/batch-requests.t
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ passed
GET /aggregate
--- error_code: 400
--- response_body
{"error_msg":"bad request body: object matches none of the requireds: [\"pipeline\"]"}
{"error_msg":"bad request body: object matches none of the required: [\"pipeline\"]"}
--- no_error_log
[error]
Expand Down Expand Up @@ -1003,7 +1003,7 @@ passed
GET /t
--- error_code: 400
--- response_body eval
qr/\{"error_msg":"invalid configuration: property \\"max_body_size\\" validation failed: expected 0 to be strictly greater than 0"\}/
qr/\{"error_msg":"invalid configuration: property \\"max_body_size\\" validation failed: expected 0 to be greater than 0"\}/
--- no_error_log
[error]
Expand Down
2 changes: 1 addition & 1 deletion t/plugin/client-control.t
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ POST /hello
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin client-control err: property \"max_body_size\" validation failed: expected -1 to be greater than 0"}
{"error_msg":"failed to check the configuration of plugin client-control err: property \"max_body_size\" validation failed: expected -1 to be at least 0"}
Expand Down
2 changes: 1 addition & 1 deletion t/plugin/example.t
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ done
--- request
GET /t
--- response_body
property "i" validation failed: expected -1 to be greater than 0
property "i" validation failed: expected -1 to be at least 0
done
--- no_error_log
[error]
Expand Down
10 changes: 5 additions & 5 deletions t/plugin/gzip.t
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ Vary: upstream, Accept-Encoding
}
}
--- response_body
{"error_msg":"failed to check the configuration of plugin gzip err: property \"types\" validation failed: object matches none of the requireds"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"min_length\" validation failed: expected 0 to be greater than 1"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"comp_level\" validation failed: expected 10 to be smaller than 9"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"types\" validation failed: object matches none of the required"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"min_length\" validation failed: expected 0 to be at least 1"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"comp_level\" validation failed: expected 10 to be at most 9"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"http_version\" validation failed: matches none of the enum values"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"buffers\" validation failed: property \"number\" validation failed: expected 0 to be greater than 1"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"buffers\" validation failed: property \"size\" validation failed: expected 0 to be greater than 1"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"buffers\" validation failed: property \"number\" validation failed: expected 0 to be at least 1"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"buffers\" validation failed: property \"size\" validation failed: expected 0 to be at least 1"}
{"error_msg":"failed to check the configuration of plugin gzip err: property \"vary\" validation failed: wrong type: expected boolean, got number"}
6 changes: 3 additions & 3 deletions t/plugin/ip-restriction.t
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ GET /t
--- request
GET /t
--- response_body_like eval
qr/failed to validate item 1: object matches none of the requireds/
qr/failed to validate item 1: object matches none of the required/
--- no_error_log
[error]
Expand Down Expand Up @@ -115,7 +115,7 @@ qr/failed to validate item 1: object matches none of the requireds/
--- request
GET /t
--- response_body_like eval
qr/failed to validate item 1: object matches none of the requireds/
qr/failed to validate item 1: object matches none of the required/
--- no_error_log
[error]
Expand Down Expand Up @@ -567,7 +567,7 @@ GET /hello
--- request
GET /t
--- response_body_like eval
qr/failed to validate item 1: object matches none of the requireds/
qr/failed to validate item 1: object matches none of the required/
--- no_error_log
[error]
Expand Down
4 changes: 2 additions & 2 deletions t/plugin/kafka-logger2.t
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ qr/not found topic, retryable: true, topic: undefined_topic, partition_id: -1/
--- response_body
property "broker_list" validation failed: expect object to have at least 1 properties
property "broker_list" validation failed: failed to validate 127.0.0.1 (matching ".*"): wrong type: expected integer, got string
property "broker_list" validation failed: failed to validate 127.0.0.1 (matching ".*"): expected 0 to be greater than 1
property "broker_list" validation failed: failed to validate 127.0.0.1 (matching ".*"): expected 65536 to be smaller than 65535
property "broker_list" validation failed: failed to validate 127.0.0.1 (matching ".*"): expected 0 to be at least 1
property "broker_list" validation failed: failed to validate 127.0.0.1 (matching ".*"): expected 65536 to be at most 65535
Expand Down
Loading

0 comments on commit 1e0e479

Please sign in to comment.