summaryrefslogtreecommitdiff
path: root/json/tests/draft2019-09/dependentSchemas.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2019-09/dependentSchemas.json')
-rw-r--r--json/tests/draft2019-09/dependentSchemas.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/dependentSchemas.json b/json/tests/draft2019-09/dependentSchemas.json
index b397583..3577efd 100644
--- a/json/tests/draft2019-09/dependentSchemas.json
+++ b/json/tests/draft2019-09/dependentSchemas.json
@@ -128,5 +128,43 @@
"valid": false
}
]
+ },
+ {
+ "description": "dependent subschema incompatible with root",
+ "schema": {
+ "properties": {
+ "foo": {}
+ },
+ "dependentSchemas": {
+ "foo": {
+ "properties": {
+ "bar": {}
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "matches root",
+ "data": {"foo": 1},
+ "valid": false
+ },
+ {
+ "description": "matches dependency",
+ "data": {"bar": 1},
+ "valid": true
+ },
+ {
+ "description": "matches both",
+ "data": {"foo": 1, "bar": 2},
+ "valid": false
+ },
+ {
+ "description": "no dependency",
+ "data": {"baz": 1},
+ "valid": true
+ }
+ ]
}
]