diff options
Diffstat (limited to 'json/tests/draft-next/optional/refOfUnknownKeyword.json')
-rw-r--r-- | json/tests/draft-next/optional/refOfUnknownKeyword.json | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/json/tests/draft-next/optional/refOfUnknownKeyword.json b/json/tests/draft-next/optional/refOfUnknownKeyword.json new file mode 100644 index 0000000..5b150df --- /dev/null +++ b/json/tests/draft-next/optional/refOfUnknownKeyword.json @@ -0,0 +1,44 @@ +[ + { + "description": "reference of a root arbitrary keyword ", + "schema": { + "unknown-keyword": {"type": "integer"}, + "properties": { + "bar": {"$ref": "#/unknown-keyword"} + } + }, + "tests": [ + { + "description": "match", + "data": {"bar": 3}, + "valid": true + }, + { + "description": "mismatch", + "data": {"bar": true}, + "valid": false + } + ] + }, + { + "description": "reference of an arbitrary keyword of a sub-schema", + "schema": { + "properties": { + "foo": {"unknown-keyword": {"type": "integer"}}, + "bar": {"$ref": "#/properties/foo/unknown-keyword"} + } + }, + "tests": [ + { + "description": "match", + "data": {"bar": 3}, + "valid": true + }, + { + "description": "mismatch", + "data": {"bar": true}, + "valid": false + } + ] + } +] |