diff --git a/README.md b/README.md index 8785e57c..24d9a2e1 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,15 @@ If your implementation supports multiple versions, run the above procedure for e 1. The suite, notably in its `refRemote.json` file in each specification version directory, expects a number of remote references to be configured. These are JSON documents, identified by URI, which are used by the suite to test the behavior of the `$ref` keyword (and related keywords). + + "Remotes" are located in the top-level "remotes" directory. Within this + directory are folders matching the directory names of each dialect's test + suite. The schemas in those directories are required for the test suite that + matches the directory name. For example, the remotes in + `remotes/draft2020-12` are required by the `tests/draft2020-12` test suite. + Any schemas in the remotes directory that are not in a folder corresponding + to a test suite are required by all test suites. + Depending on your implementation, you may configure how to "register" these *either*: * by directly retrieving them off the filesystem from the `remotes/` directory, in which case you should load each schema with a retrieval URI of `http://localhost:1234` followed by the relative path from the remotes directory -- e.g. a `$ref` to `http://localhost:1234/foo/bar/baz.json` is expected to resolve to the contents of the file at `remotes/foo/bar/baz.json` diff --git a/remotes/draft7/ignore-dependentRequired.json b/remotes/draft2019-09/ignore-dependentRequired.json similarity index 58% rename from remotes/draft7/ignore-dependentRequired.json rename to remotes/draft2019-09/ignore-dependentRequired.json index 0ea927b5..4ce2a203 100644 --- a/remotes/draft7/ignore-dependentRequired.json +++ b/remotes/draft2019-09/ignore-dependentRequired.json @@ -1,7 +1,7 @@ { - "$id": "http://localhost:1234/draft7/integer.json", + "$id": "http://localhost:1234/draft2019-09/ignore-dependentRequired.json", "$schema": "http://json-schema.org/draft-07/schema#", "dependentRequired": { "foo": ["bar"] } -} \ No newline at end of file +} diff --git a/remotes/draft2020-12/prefixItems.json b/remotes/draft2019-09/prefixItems.json similarity index 100% rename from remotes/draft2020-12/prefixItems.json rename to remotes/draft2019-09/prefixItems.json diff --git a/remotes/draft2019-09/ignore-prefixItems.json b/remotes/draft2020-12/ignore-prefixItems.json similarity index 67% rename from remotes/draft2019-09/ignore-prefixItems.json rename to remotes/draft2020-12/ignore-prefixItems.json index b5ef3928..0ef44663 100644 --- a/remotes/draft2019-09/ignore-prefixItems.json +++ b/remotes/draft2020-12/ignore-prefixItems.json @@ -1,5 +1,5 @@ { - "$id": "http://localhost:1234/draft2019-09/ignore-prefixItems.json", + "$id": "http://localhost:1234/draft2020-12/ignore-prefixItems.json", "$schema": "https://json-schema.org/draft/2019-09/schema", "prefixItems": [ {"type": "string"} diff --git a/remotes/draft2019-09/dependentRequired.json b/remotes/draft7/dependentRequired.json similarity index 63% rename from remotes/draft2019-09/dependentRequired.json rename to remotes/draft7/dependentRequired.json index 0d691d96..f16a3450 100644 --- a/remotes/draft2019-09/dependentRequired.json +++ b/remotes/draft7/dependentRequired.json @@ -1,5 +1,5 @@ { - "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", + "$id": "http://localhost:1234/draft7/dependentRequired.json", "$schema": "https://json-schema.org/draft/2019-09/schema", "dependentRequired": { "foo": ["bar"] diff --git a/tests/draft2019-09/optional/cross-draft.json b/tests/draft2019-09/optional/cross-draft.json index efd3f87d..a96ae506 100644 --- a/tests/draft2019-09/optional/cross-draft.json +++ b/tests/draft2019-09/optional/cross-draft.json @@ -4,7 +4,7 @@ "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "array", - "$ref": "http://localhost:1234/draft2020-12/prefixItems.json" + "$ref": "http://localhost:1234/draft2019-09/prefixItems.json" }, "tests": [ { @@ -26,7 +26,7 @@ "type": "object", "allOf": [ { "properties": { "foo": true } }, - { "$ref": "http://localhost:1234/draft7/ignore-dependentRequired.json" } + { "$ref": "http://localhost:1234/draft2019-09/ignore-dependentRequired.json" } ] }, "tests": [ diff --git a/tests/draft2020-12/optional/cross-draft.json b/tests/draft2020-12/optional/cross-draft.json index 5113bd64..c21b218c 100644 --- a/tests/draft2020-12/optional/cross-draft.json +++ b/tests/draft2020-12/optional/cross-draft.json @@ -4,7 +4,7 @@ "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", - "$ref": "http://localhost:1234/draft2019-09/ignore-prefixItems.json" + "$ref": "http://localhost:1234/draft2020-12/ignore-prefixItems.json" }, "tests": [ { diff --git a/tests/draft7/optional/cross-draft.json b/tests/draft7/optional/cross-draft.json index 8ff53736..026919fc 100644 --- a/tests/draft7/optional/cross-draft.json +++ b/tests/draft7/optional/cross-draft.json @@ -5,7 +5,7 @@ "type": "object", "allOf": [ { "properties": { "foo": true } }, - { "$ref": "http://localhost:1234/draft2019-09/dependentRequired.json" } + { "$ref": "http://localhost:1234/draft7/dependentRequired.json" } ] }, "tests": [