diff options
author | Julian Berman <Julian@GrayVines.com> | 2022-08-16 09:35:23 +0300 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2022-08-16 09:35:23 +0300 |
commit | 9aea572efe7c094dba03e98d5879867087f78292 (patch) | |
tree | 2c27cab9507ab096adb6bc98bc5bb8f49151a698 /json/tests/draft2019-09/optional | |
parent | a593a15341f3da9504219793732430fdee835645 (diff) | |
parent | 74e91ee79990c28d937d54a6d2f9d18fd338af20 (diff) | |
download | jsonschema-9aea572efe7c094dba03e98d5879867087f78292.tar.gz |
Merge commit '74e91ee79990c28d937d54a6d2f9d18fd338af20'
* commit '74e91ee79990c28d937d54a6d2f9d18fd338af20':
Squashed 'json/' changes from 597b1fb0d..b3c8672a3
Diffstat (limited to 'json/tests/draft2019-09/optional')
-rw-r--r-- | json/tests/draft2019-09/optional/cross-draft.json | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/optional/cross-draft.json b/json/tests/draft2019-09/optional/cross-draft.json new file mode 100644 index 0000000..efd3f87 --- /dev/null +++ b/json/tests/draft2019-09/optional/cross-draft.json @@ -0,0 +1,41 @@ +[ + { + "description": "refs to future drafts are processed as future drafts", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "array", + "$ref": "http://localhost:1234/draft2020-12/prefixItems.json" + }, + "tests": [ + { + "description": "first item not a string is invalid", + "comment": "if the implementation is not processing the $ref as a 2020-12 schema, this test will fail", + "data": [1, 2, 3], + "valid": false + }, + { + "description": "first item is a string is valid", + "data": ["a string", 1, 2, 3], + "valid": true + } + ] + }, + { + "description": "refs to historic drafts are processed as historic drafts", + "schema": { + "type": "object", + "allOf": [ + { "properties": { "foo": true } }, + { "$ref": "http://localhost:1234/draft7/ignore-dependentRequired.json" } + ] + }, + "tests": [ + { + "description": "missing bar is valid", + "comment": "if the implementation is not processing the $ref as a draft 7 schema, this test will fail", + "data": {"foo": "any value"}, + "valid": true + } + ] + } +] |