Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
Original file line number Diff line number Diff line change
@@ -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"}
Expand Down
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions tests/draft2019-09/optional/cross-draft.json
Comment thread
gregsdennis marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion tests/draft2020-12/optional/cross-draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
2 changes: 1 addition & 1 deletion tests/draft7/optional/cross-draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Loading