summaryrefslogtreecommitdiff
path: root/json/tests/draft7/dependencies.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft7/dependencies.json')
-rw-r--r--json/tests/draft7/dependencies.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/json/tests/draft7/dependencies.json b/json/tests/draft7/dependencies.json
index a5e5428..c0bd809 100644
--- a/json/tests/draft7/dependencies.json
+++ b/json/tests/draft7/dependencies.json
@@ -244,5 +244,43 @@
"valid": false
}
]
+ },
+ {
+ "description": "dependent subschema incompatible with root",
+ "schema": {
+ "properties": {
+ "foo": {}
+ },
+ "dependencies": {
+ "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
+ }
+ ]
}
]