diff options
Diffstat (limited to 'json/tests/draft2019-09/unevaluatedItems.json')
-rw-r--r-- | json/tests/draft2019-09/unevaluatedItems.json | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/json/tests/draft2019-09/unevaluatedItems.json b/json/tests/draft2019-09/unevaluatedItems.json index 55d33e2..a0b1f33 100644 --- a/json/tests/draft2019-09/unevaluatedItems.json +++ b/json/tests/draft2019-09/unevaluatedItems.json @@ -99,7 +99,7 @@ ] }, { - "description": "unevaluatedItems with additionalItems", + "description": "unevaluatedItems with items and additionalItems", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "items": [ @@ -117,6 +117,48 @@ ] }, { + "description": "unevaluatedItems with ignored additionalItems", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "additionalItems": {"type": "number"}, + "unevaluatedItems": {"type": "string"} + }, + "tests": [ + { + "description": "invalid under unevaluatedItems", + "comment": "additionalItems is entirely ignored when items isn't present, so all elements need to be valid against the unevaluatedItems schema", + "data": ["foo", 1], + "valid": false + }, + { + "description": "all valid under unevaluatedItems", + "data": ["foo", "bar", "baz"], + "valid": true + } + ] + }, + { + "description": "unevaluatedItems with ignored applicator additionalItems", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "allOf": [ { "additionalItems": { "type": "number" } } ], + "unevaluatedItems": {"type": "string"} + }, + "tests": [ + { + "description": "invalid under unevaluatedItems", + "comment": "additionalItems is entirely ignored when items isn't present, so all elements need to be valid against the unevaluatedItems schema", + "data": ["foo", 1], + "valid": false + }, + { + "description": "all valid under unevaluatedItems", + "data": ["foo", "bar", "baz"], + "valid": true + } + ] + }, + { "description": "unevaluatedItems with nested tuple", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", |