From 190ae675c8fa5380dbd5c9165e7a9bfefc00d2d7 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 11:25:02 -0700 Subject: [PATCH 1/3] Fix miscategorized remotes --- .../{draft7 => draft2019-09}/ignore-dependentRequired.json | 4 ++-- remotes/{draft2020-12 => draft2019-09}/prefixItems.json | 0 .../{draft2019-09 => draft2020-12}/ignore-prefixItems.json | 2 +- remotes/{draft2019-09 => draft7}/dependentRequired.json | 2 +- tests/draft2019-09/optional/cross-draft.json | 4 ++-- tests/draft2020-12/optional/cross-draft.json | 2 +- tests/draft7/optional/cross-draft.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename remotes/{draft7 => draft2019-09}/ignore-dependentRequired.json (64%) rename remotes/{draft2020-12 => draft2019-09}/prefixItems.json (100%) rename remotes/{draft2019-09 => draft2020-12}/ignore-prefixItems.json (67%) rename remotes/{draft2019-09 => draft7}/dependentRequired.json (63%) diff --git a/remotes/draft7/ignore-dependentRequired.json b/remotes/draft2019-09/ignore-dependentRequired.json similarity index 64% rename from remotes/draft7/ignore-dependentRequired.json rename to remotes/draft2019-09/ignore-dependentRequired.json index 0ea927b50..f2eb50482 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/integer.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 b5ef3928c..0ef446638 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 0d691d964..f16a34500 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 efd3f87dc..a96ae5067 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 5113bd649..c21b218c8 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 8ff537362..026919fc1 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": [ From de0e74e6343ac45ec98ed33eff124fbd551d1f93 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Wed, 11 Mar 2026 13:41:47 -0700 Subject: [PATCH 2/3] Fix incorrect remote $id. It should match the location. --- remotes/draft2019-09/ignore-dependentRequired.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remotes/draft2019-09/ignore-dependentRequired.json b/remotes/draft2019-09/ignore-dependentRequired.json index f2eb50482..4ce2a2036 100644 --- a/remotes/draft2019-09/ignore-dependentRequired.json +++ b/remotes/draft2019-09/ignore-dependentRequired.json @@ -1,5 +1,5 @@ { - "$id": "http://localhost:1234/draft2019-09/integer.json", + "$id": "http://localhost:1234/draft2019-09/ignore-dependentRequired.json", "$schema": "http://json-schema.org/draft-07/schema#", "dependentRequired": { "foo": ["bar"] From b012040ceac440880de25094dde7114939bc5eec Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Wed, 22 Apr 2026 11:37:37 -0700 Subject: [PATCH 3/3] Update README to explain the folders in the remotes directory --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8785e57ce..24d9a2e1d 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`