diff options
Diffstat (limited to 'json/tests/draft-next/unevaluatedProperties.json')
-rw-r--r-- | json/tests/draft-next/unevaluatedProperties.json | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/json/tests/draft-next/unevaluatedProperties.json b/json/tests/draft-next/unevaluatedProperties.json index f3d4012..69fe8a0 100644 --- a/json/tests/draft-next/unevaluatedProperties.json +++ b/json/tests/draft-next/unevaluatedProperties.json @@ -1232,7 +1232,7 @@ ] }, { - "description": "dynamic evalation inside nested refs", + "description": "dynamic evaluation inside nested refs", "schema": { "$schema": "https://json-schema.org/draft/next/schema", "$defs": { @@ -1482,7 +1482,7 @@ }, "propertyDependencies": { "foo": { - "foo1": { + "foo1": { "properties": { "bar": true } @@ -1538,5 +1538,35 @@ "valid": false } ] + }, + { + "description": "unevaluatedProperties can see annotations from if without then and else", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "if": { + "patternProperties": { + "foo": { + "type": "string" + } + } + }, + "unevaluatedProperties": false + }, + "tests": [ + { + "description": "valid in case if is evaluated", + "data": { + "foo": "a" + }, + "valid": true + }, + { + "description": "invalid in case if is evaluated", + "data": { + "bar": "a" + }, + "valid": false + } + ] } ] |