summaryrefslogtreecommitdiff
path: root/json/tests/draft2019-09/unevaluatedProperties.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2019-09/unevaluatedProperties.json')
-rw-r--r--json/tests/draft2019-09/unevaluatedProperties.json30
1 files changed, 30 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/unevaluatedProperties.json b/json/tests/draft2019-09/unevaluatedProperties.json
index fdb4ac9..a6cce8b 100644
--- a/json/tests/draft2019-09/unevaluatedProperties.json
+++ b/json/tests/draft2019-09/unevaluatedProperties.json
@@ -1441,5 +1441,35 @@
"valid": false
}
]
+ },
+ {
+ "description": "unevaluatedProperties can see annotations from if without then and else",
+ "schema": {
+ "$schema": "https://json-schema.org/draft/2019-09/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
+ }
+ ]
}
]