diff --git a/remotes/draft2019-09/dependentRequired.json b/remotes/draft2019-09/dependentRequired.json new file mode 100644 index 00000000..0d691d96 --- /dev/null +++ b/remotes/draft2019-09/dependentRequired.json @@ -0,0 +1,7 @@ +{ + "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "dependentRequired": { + "foo": ["bar"] + } +} diff --git a/tests/draft7/optional/cross-draft.json b/tests/draft7/optional/cross-draft.json new file mode 100644 index 00000000..a4314a2c --- /dev/null +++ b/tests/draft7/optional/cross-draft.json @@ -0,0 +1,24 @@ +[ + { + "description": "refs to future drafts are processed as future drafts", + "schema": { + "type": "object", + "allOf": [ + { "properties": { "foo": true } }, + { "$ref": "http://localhost:1234/draft2019-09/dependentRequired.json" } + ] + }, + "tests": [ + { + "description": "missing bar is invalid", + "data": {"foo": "any value"}, + "valid": false + }, + { + "description": "present bar is valid", + "data": {"foo": "any value", "bar": "also any value"}, + "valid": true + } + ] + } +]