diff options
author | Julian Berman <Julian@GrayVines.com> | 2020-02-22 17:12:34 -0500 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2020-02-22 17:12:34 -0500 |
commit | 1fc76078f5f20ffd09e365a23925ecfbe826908e (patch) | |
tree | 93fb3fc28ac240edad5253bbefc9c8a8c1225301 /json/tests/draft2019-09/optional | |
parent | 0d192e192526252c30c16b3651c293bb5f21a99f (diff) | |
parent | f7930d774c893cfae814a214d9b2ba0c01957928 (diff) | |
download | jsonschema-1fc76078f5f20ffd09e365a23925ecfbe826908e.tar.gz |
Merge commit 'f7930d774c893cfae814a214d9b2ba0c01957928'
* commit 'f7930d774c893cfae814a214d9b2ba0c01957928':
Squashed 'json/' changes from a863dbab..d52866b3
Diffstat (limited to 'json/tests/draft2019-09/optional')
-rw-r--r-- | json/tests/draft2019-09/optional/refOfUnknownKeyword.json | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/optional/refOfUnknownKeyword.json b/json/tests/draft2019-09/optional/refOfUnknownKeyword.json new file mode 100644 index 0000000..5b150df --- /dev/null +++ b/json/tests/draft2019-09/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 + } + ] + } +] |