Skip to content

Commit acaece3

Browse files
stop using the term "draft" to mean "version", and fix the remaining mentions of draft-next (now v1)
1 parent 980e105 commit acaece3

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ The recommended workflow of this test suite is to clone the `main` branch of thi
1616

1717
## Coverage
1818

19-
All JSON Schema specification releases should be well covered by this suite, including drafts 2020-12, 2019-09, 07, 06, 04 and 03.
20-
Drafts 04 and 03 are considered "frozen" in that less effort is put in to backport new tests to these versions.
19+
All JSON Schema specification releases should be well covered by this suite, including versions draft-2020-12, draft-2019-09, draft-07, draft-06, draft-04 and draft-03.
20+
Versions draft-04 and draft-03 are considered "frozen" in that less effort is put in to backport new tests to these versions.
2121

2222
Additional coverage is always welcome, particularly for bugs encountered in real-world implementations.
2323
If you see anything missing or incorrect, please feel free to [file an issue](https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues) or [submit a PR](https://github.com/json-schema-org/JSON-Schema-Test-Suite).
@@ -31,14 +31,13 @@ Inside that directory is a subdirectory for each released version of the specifi
3131

3232
The structure and contents of each file in these directories is described below.
3333

34-
In addition to the version-specific subdirectories, two additional directories are present:
34+
In addition to the version-specific subdirectories, one additional directory is present:
3535

36-
1. `draft-next/`: containing tests for the next version of the specification whilst it is in development
37-
2. `latest/`: a symbolic link which points to the directory which is the most recent release (which may be useful for implementations providing specific entry points for validating against the latest version of the specification)
36+
1. `latest/`: a symbolic link which points to the directory which is the most recent release (which may be useful for implementations providing specific entry points for validating against the latest version of the specification)
3837

3938
Inside each version directory there are a number of `.json` files each containing a collection of related tests.
4039
Often the grouping is by property under test, but not always.
41-
In addition to the `.json` files, each version directory contains one or more special subdirectories whose purpose is [described below](#subdirectories-within-each-draft), and which contain additional `.json` files.
40+
In addition to the `.json` files, each version directory contains one or more special subdirectories whose purpose is [described below](#subdirectories-within-each-version-directory), and which contain additional `.json` files.
4241

4342
Each `.json` file consists of a single JSON array of test cases.
4443

@@ -78,9 +77,9 @@ Here is a single *test case*, containing one or more tests:
7877
}
7978
```
8079

81-
### Subdirectories Within Each Draft
80+
### Subdirectories Within Each Version directory
8281

83-
There is currently only one additional subdirectory that may exist within each draft test directory.
82+
There is currently only one additional subdirectory that may exist within each specification version test directory.
8483

8584
This is:
8685

@@ -107,8 +106,8 @@ The precise steps described do not need to be followed exactly, but the results
107106

108107
To test a specific version:
109108

110-
* For 2019-09 and later published drafts, implementations that are able to detect the draft of each schema via `$schema` SHOULD be configured to do so
111-
* For draft-07 and earlier, draft-next, and implementations unable to detect via `$schema`, implementations MUST be configured to expect the draft matching the test directory name
109+
* For 2019-09 and later published versions, implementations that are able to detect the version of each schema via `$schema` SHOULD be configured to do so
110+
* For draft-07 and earlier, v1 (not yet released), and implementations unable to detect via `$schema`, implementations MUST be configured to expect the version matching the test directory name
112111
* Load any remote references [described below](#additional-assumptions) and configure your implementation to retrieve them via their URIs
113112
* Walk the filesystem tree for that version's subdirectory and for each `.json` file found:
114113

@@ -135,7 +134,7 @@ If your implementation supports multiple versions, run the above procedure for e
135134

136135
### Additional Assumptions
137136

138-
1. The suite, notably in its `refRemote.json` file in each draft, expects a number of remote references to be configured.
137+
1. The suite, notably in its `refRemote.json` file in each specification version directory, expects a number of remote references to be configured.
139138
These are JSON documents, identified by URI, which are used by the suite to test the behavior of the `$ref` keyword (and related keywords).
140139
Depending on your implementation, you may configure how to "register" these *either*:
141140

@@ -158,7 +157,7 @@ If your implementation supports multiple versions, run the above procedure for e
158157
}
159158
```
160159
161-
2. Test cases found within [special subdirectories](#subdirectories-within-each-draft) may require additional configuration to run.
160+
2. Test cases found within [special subdirectories](#subdirectories-within-each-version-directory) may require additional configuration to run.
162161
In particular, when running tests within the `optional/format` subdirectory, test runners should configure implementations to enable format validation, where the implementation supports it.
163162
164163
### Invariants & Guarantees

output-tests/draft-next/content/general.json renamed to output-tests/v1/content/general.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "failed validation produces no annotations",
44
"schema": {
55
"$schema": "https://json-schema.org/draft/next/schema",
6-
"$id": "https://json-schema.org/tests/content/draft-next/general/0",
6+
"$id": "https://json-schema.org/tests/content/v1/general/0",
77
"type": "string",
88
"readOnly": true
99
},
@@ -13,14 +13,14 @@
1313
"data": 1,
1414
"output": {
1515
"list": {
16-
"$id": "https://json-schema.org/tests/content/draft-next/general/0/tests/0/basic",
16+
"$id": "https://json-schema.org/tests/content/v1/general/0/tests/0/basic",
1717
"$ref": "/draft/next/output/schema",
1818
"properties": {
1919
"details": {
2020
"contains": {
2121
"properties": {
2222
"evaluationPath": {"const": ""},
23-
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/general/0#"},
23+
"schemaLocation": {"const": "https://json-schema.org/tests/content/v1/general/0#"},
2424
"instanceLocation": {"const": ""},
2525
"annotations": false,
2626
"droppedAnnotations": {

output-tests/draft-next/content/readOnly.json renamed to output-tests/v1/content/readOnly.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "readOnly generates its value as an annotation",
44
"schema": {
55
"$schema": "https://json-schema.org/draft/next/schema",
6-
"$id": "https://json-schema.org/tests/content/draft-next/readOnly/0",
6+
"$id": "https://json-schema.org/tests/content/v1/readOnly/0",
77
"readOnly": true
88
},
99
"tests": [
@@ -12,14 +12,14 @@
1212
"data": 1,
1313
"output": {
1414
"list": {
15-
"$id": "https://json-schema.org/tests/content/draft-next/readOnly/0/tests/0/basic",
15+
"$id": "https://json-schema.org/tests/content/v1/readOnly/0/tests/0/basic",
1616
"$ref": "/draft/next/output/schema",
1717
"properties": {
1818
"details": {
1919
"contains": {
2020
"properties": {
2121
"evaluationPath": {"const": ""},
22-
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/readOnly/0#"},
22+
"schemaLocation": {"const": "https://json-schema.org/tests/content/v1/readOnly/0#"},
2323
"instanceLocation": {"const": ""},
2424
"annotations": {
2525
"properties": {

output-tests/draft-next/content/type.json renamed to output-tests/v1/content/type.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "incorrect type",
44
"schema": {
55
"$schema": "https://json-schema.org/draft/next/schema",
6-
"$id": "https://json-schema.org/tests/content/draft-next/type/0",
6+
"$id": "https://json-schema.org/tests/content/v1/type/0",
77
"type": "string"
88
},
99
"tests": [
@@ -12,14 +12,14 @@
1212
"data": 1,
1313
"output": {
1414
"list": {
15-
"$id": "https://json-schema.org/tests/content/draft-next/type/0/tests/0/basic",
15+
"$id": "https://json-schema.org/tests/content/v1/type/0/tests/0/basic",
1616
"$ref": "/draft/next/output/schema",
1717
"properties": {
1818
"details": {
1919
"contains": {
2020
"properties": {
2121
"evaluationPath": {"const": ""},
22-
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/type/0#"},
22+
"schemaLocation": {"const": "https://json-schema.org/tests/content/v1/type/0#"},
2323
"instanceLocation": {"const": ""},
2424
"annotations": false,
2525
"errors": {
File renamed without changes.

tests/v1/optional/unknownKeyword.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
"not": {
1010
"array_of_schemas": [
1111
{
12-
"$id": "https://localhost:1234/draft-next/unknownKeyword/my_identifier.json",
12+
"$id": "https://localhost:1234/v1/unknownKeyword/my_identifier.json",
1313
"type": "null"
1414
}
1515
]
1616
}
1717
},
1818
"real_id_in_schema": {
19-
"$id": "https://localhost:1234/draft-next/unknownKeyword/my_identifier.json",
19+
"$id": "https://localhost:1234/v1/unknownKeyword/my_identifier.json",
2020
"type": "string"
2121
},
2222
"id_in_unknown1": {
2323
"not": {
2424
"object_of_schemas": {
2525
"foo": {
26-
"$id": "https://localhost:1234/draft-next/unknownKeyword/my_identifier.json",
26+
"$id": "https://localhost:1234/v1/unknownKeyword/my_identifier.json",
2727
"type": "integer"
2828
}
2929
}
@@ -33,7 +33,7 @@
3333
"anyOf": [
3434
{ "$ref": "#/$defs/id_in_unknown0" },
3535
{ "$ref": "#/$defs/id_in_unknown1" },
36-
{ "$ref": "https://localhost:1234/draft-next/unknownKeyword/my_identifier.json" }
36+
{ "$ref": "https://localhost:1234/v1/unknownKeyword/my_identifier.json" }
3737
]
3838
},
3939
"tests": [

0 commit comments

Comments
 (0)