diff options
Diffstat (limited to 'json/tests/draft4/dependencies.json')
-rw-r--r-- | json/tests/draft4/dependencies.json | 38 |
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 + } + ] } ] |