fix: upgrade jsonschema to 0.9.6 (#6091)

This commit is contained in:
罗泽轩 2022-01-14 09:35:18 +08:00 committed by GitHub
parent f3d7550435
commit 7a31ec786d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 70 additions and 70 deletions

View File

@ -51,7 +51,7 @@ dependencies = {
"luafilesystem = 1.7.0-2",
"api7-lua-tinyyaml = 0.4.2",
"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",

View File

@ -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"}
@ -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"}
@ -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"}
@ -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\"]"}

6
t/admin/routes.t vendored
View File

@ -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]
@ -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]
@ -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]

2
t/admin/routes3.t vendored
View File

@ -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"}

View File

@ -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]
@ -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]
@ -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]

6
t/admin/services.t vendored
View File

@ -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]
@ -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]
@ -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]

View File

@ -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]
@ -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]
@ -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]
@ -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
t/admin/upstream.t vendored
View File

@ -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]
@ -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]
@ -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]
@ -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]

2
t/admin/upstream2.t vendored
View File

@ -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
t/admin/upstream3.t vendored
View File

@ -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"}

4
t/admin/upstream4.t vendored
View File

@ -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"}
@ -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"}

View File

@ -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\"]"}

View File

@ -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
@ -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

View File

@ -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"}

View File

@ -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]

View File

@ -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]
@ -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]
@ -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]

View File

@ -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]
@ -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]

View File

@ -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"}

2
t/plugin/example.t vendored
View File

@ -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]

10
t/plugin/gzip.t vendored
View File

@ -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"}

View File

@ -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]
@ -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]
@ -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]

View File

@ -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

View File

@ -428,7 +428,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-conn err: property \"conn\" validation failed: expected -1 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-conn err: property \"conn\" validation failed: expected -1 to be greater than 0"}
--- no_error_log
[error]
@ -511,7 +511,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-conn err: property \"conn\" validation failed: expected -1 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-conn err: property \"conn\" validation failed: expected -1 to be greater than 0"}
--- no_error_log
[error]
@ -980,8 +980,8 @@ GET /test_concurrency
--- request
GET /t
--- response_body
property "conn" validation failed: expected 0 to be strictly greater than 0
property "default_conn_delay" validation failed: expected 0 to be strictly greater than 0
property "conn" validation failed: expected 0 to be greater than 0
property "default_conn_delay" validation failed: expected 0 to be greater than 0
done
--- no_error_log
[error]

View File

@ -268,7 +268,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be greater than 0"}
--- no_error_log
[error]
@ -310,7 +310,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be greater than 0"}
--- no_error_log
[error]
@ -390,7 +390,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be greater than 0"}
--- no_error_log
[error]
@ -431,7 +431,7 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-count err: property \"count\" validation failed: expected -100 to be greater than 0"}
--- no_error_log
[error]
@ -1345,7 +1345,7 @@ passed
--- request
GET /t
--- response_body eval
qr/property \"count\" validation failed: expected 0 to be strictly greater than 0/
qr/property \"count\" validation failed: expected 0 to be greater than 0/
--- no_error_log
[error]
@ -1367,6 +1367,6 @@ qr/property \"count\" validation failed: expected 0 to be strictly greater than
--- request
GET /t
--- response_body eval
qr/property \"time_window\" validation failed: expected 0 to be strictly greater than 0/
qr/property \"time_window\" validation failed: expected 0 to be greater than 0/
--- no_error_log
[error]

View File

@ -290,7 +290,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin limit-req err: property \"rate\" validation failed: expected -1 to be strictly greater than 0"}
{"error_msg":"failed to check the configuration of plugin limit-req err: property \"rate\" validation failed: expected -1 to be greater than 0"}
--- no_error_log
[error]
@ -756,6 +756,6 @@ passed
--- request
GET /t
--- response_body eval
qr/property \"rate\" validation failed: expected 0 to be strictly greater than 0/
qr/property \"rate\" validation failed: expected 0 to be greater than 0/
--- no_error_log
[error]

View File

@ -482,7 +482,7 @@ passed
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin proxy-mirror err: property \"sample_ratio\" validation failed: expected 10 to be smaller than 1"}
{"error_msg":"failed to check the configuration of plugin proxy-mirror err: property \"sample_ratio\" validation failed: expected 10 to be at most 1"}
--- no_error_log
[error]

2
t/plugin/real-ip.t vendored
View File

@ -83,7 +83,7 @@ __DATA__
}
--- response_body
{"error_msg":"failed to check the configuration of plugin real-ip err: property \"source\" is required"}
{"error_msg":"failed to check the configuration of plugin real-ip err: property \"trusted_addresses\" validation failed: failed to validate item 1: object matches none of the requireds"}
{"error_msg":"failed to check the configuration of plugin real-ip err: property \"trusted_addresses\" validation failed: failed to validate item 1: object matches none of the required"}
{"error_msg":"failed to check the configuration of plugin real-ip err: invalid ip address: ::1\/129"}

View File

@ -62,7 +62,7 @@ done
--- request
GET /t
--- response_body_like eval
qr/object matches none of the requireds/
qr/object matches none of the required/
--- no_error_log
[error]
@ -1652,7 +1652,7 @@ qr/string too long/
--- request
GET /t
--- response_body_like eval
qr/object matches none of the requireds/
qr/object matches none of the required/
--- error_code: 400
--- no_error_log
[error]
@ -1776,7 +1776,7 @@ qr/opentracing/
--- request
GET /t
--- response_body_like eval
qr/expected 10000 to be smaller than 599/
qr/expected 10000 to be at most 599/
--- error_code: 400
--- no_error_log
[error]
@ -1813,7 +1813,7 @@ qr/expected 10000 to be smaller than 599/
--- request
GET /t
--- response_body_like eval
qr/object matches none of the requireds/
qr/object matches none of the required/
--- error_code: 400
--- no_error_log
[error]

View File

@ -79,7 +79,7 @@ done
--- request
GET /t
--- response_body
property "status_code" validation failed: expected 599 to be smaller than 598
property "status_code" validation failed: expected 599 to be at most 598
--- no_error_log
[error]

4
t/plugin/zipkin.t vendored
View File

@ -62,7 +62,7 @@ done
--- request
GET /t
--- response_body
property "sample_ratio" validation failed: expected -0.1 to be greater than 1e-05
property "sample_ratio" validation failed: expected -0.1 to be at least 1e-05
done
--- no_error_log
[error]
@ -85,7 +85,7 @@ done
--- request
GET /t
--- response_body
property "sample_ratio" validation failed: expected 2 to be smaller than 1
property "sample_ratio" validation failed: expected 2 to be at most 1
done
--- no_error_log
[error]