summaryrefslogtreecommitdiff
path: root/json/tests/draft4/dependencies.json
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2023-04-25 17:09:24 -0400
committerJulian Berman <Julian@GrayVines.com>2023-04-25 17:09:24 -0400
commit56fd2759e7c5a86d47fe2a9bcb60b8237a43f6d6 (patch)
treec16e531627618e3b33f87a566e0a71204d62323a /json/tests/draft4/dependencies.json
parentdc683c3105216f0c3fbfba78815b97f510e434c8 (diff)
parentb695cd7efa3e40fc41721792b4a692436b9eca39 (diff)
downloadjsonschema-56fd2759e7c5a86d47fe2a9bcb60b8237a43f6d6.tar.gz
Merge commit 'b695cd7efa3e40fc41721792b4a692436b9eca39'
* commit 'b695cd7efa3e40fc41721792b4a692436b9eca39': Squashed 'json/' changes from 0788c226a..6afa9b38d
Diffstat (limited to 'json/tests/draft4/dependencies.json')
-rw-r--r--json/tests/draft4/dependencies.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/json/tests/draft4/dependencies.json b/json/tests/draft4/dependencies.json
index 51eeddf..9045ddc 100644
--- a/json/tests/draft4/dependencies.json
+++ b/json/tests/draft4/dependencies.json
@@ -190,5 +190,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
+ }
+ ]
}
]