diff options
Diffstat (limited to 'json/tests/draft2020-12/unevaluatedItems.json')
-rw-r--r-- | json/tests/draft2020-12/unevaluatedItems.json | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/json/tests/draft2020-12/unevaluatedItems.json b/json/tests/draft2020-12/unevaluatedItems.json index 2b816af..2615c4c 100644 --- a/json/tests/draft2020-12/unevaluatedItems.json +++ b/json/tests/draft2020-12/unevaluatedItems.json @@ -692,5 +692,28 @@ "valid": true } ] + }, + { + "description": "unevaluatedItems can see annotations from if without then and else", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "if": { + "prefixItems": [{"const": "a"}] + }, + "unevaluatedItems": false + }, + "tests": [ + { + "description": "valid in case if is evaluated", + "data": [ "a" ], + "valid": true + }, + { + "description": "invalid in case if is evaluated", + "data": [ "b" ], + "valid": false + } + + ] } ] |