Skip to content

Commit fcba997

Browse files
committed
Squashed 'JSON-Schema-Test-Suite/' changes from 48461fc3..d69537ac
d69537ac Merge pull request #802 from json-schema-org/ether/draft4-boolean-schema 79ee846d Merge pull request #801 from json-schema-org/ether/missing-not-tests 2da8f9a6 remove unused remotes files 15cc161f add missing not tests from #714 47ff61c2 Merge pull request #799 from frawa/frawa-patch-1 4a640206 Merge pull request #800 from frawa/frawa-patch-2 fdabd3f9 Merge pull request #795 from anmolbhadoriya5849/fix/issue-768-additionalItems-case cd02dece Add Unison section to README 4da52d58 Remove 'typed-json' link from README 232f0795 Revert removal of additionalProperties applicator tests in v1 b4032b96 Revert removal of additionalProperties applicator tests in draft2020-12 df833be4 Remove test case for additionalProperties behavior 0d54c828 Remove test for additionalProperties behavior 756eebd6 Remove valid case for additionalItems validation a3feff79 Remove valid case for additionalItems validation 8ba96359 Remove test for additionalItems applicators f3488882 Remove valid test case for additionalItems da4a5684 Remove valid case for additionalItems validation a247442b Merge pull request #794 from json-schema-org/ether/dynamic-scopes-subschemas 19810ec1 Add a test for respecting dynamic scopes while avoiding the root of each schema 8da0a7bc Merge pull request #792 from jdesrosiers/more-v1-transistion 94c0b0e1 Fix more "draft/next" occurances that we missed 8fd4fcec Merge pull request #786 from jdesrosiers/a-label-tests be58fa98 Merge pull request #791 from json-schema-org/ether/fix-draft-next-removal acaece38 stop using the term "draft" to mean "version", and fix the remaining mentions of draft-next (now v1) 980e1052 Merge pull request #790 from dylankerr-bis/add-test-sibling-nested-ref-id b5037ed7 Add test for sibling $ref and $id in nested schema to v1 suite b8bb8585 Add more comprehensive tessts for A-labels in the "hostname" format 9b8ef536 Cleanup hostname tests (remove dups, fix descriptions, reorder) 4cf55996 Merge pull request #776 from davishmcclurg/idn-hostname-separators a930db43 Shorten test descriptions to appease ci aab08752 Updates form PR feedback 081a16a7 Test IDN label separators separate labels 658c8cf9 Test IDN label separator in `hostname` format 38c04b83 Test label separator position in hostname formats cabbd65c Merge pull request #735 from zaplapl/main ed74ee74 Add unicode tests to all the dialects fd0df6cf Update unicode tests per PR feedback 60098220 base test implementation for const equality for strings based on evalutaion by individual codepoint ef78a0eb Merge pull request #683 from mwadams/main db365735 Added tests to encoded refs to unknown keywords. 59944b7e Add test for sibling $ref and $id in nested schema to 2019 suite 2196a531 Add test for sibling $ref and $id in nested schema to 2020 suite e99b24c9 Merge pull request #788 from jdesrosiers/next-to-v1 7eac79be Bring tests up-to-date with format changes ae27be13 Bring dynamic reference tests up to date with spec changes 79dc2fd3 Unknown optional vocabs can't be ignored anymore 51f84640 Change draft-next to v1 f4e41b0c Merge pull request #785 from jdesrosiers/uneval-nested-conflicts 60a2633f Merge pull request #778 from koplas/extend-uri-validation-tests bf65ef20 Copy uri tests to other drafts 02a0d89f Merge pull request #743 from Vinit-Pandit/MeastroZI-patch-1 c1545e6c Update unevaluatedProperties.json 7e970016 Merge pull request #764 from Dragonsangel/date_time_validation 8970b1ca Add tests for evaluated property/item nesting conflicts 677a9399 Merge pull request #784 from sangamon/781-date-time-format-extended-year 9672a5b6 Merge pull request #783 from sangamon/780-uuid-format-shifted-dashes 28e49b14 add test for invalid "shifted" dashes in uuid format (#780) aecf038c add test for invalid extended year in date-time format (#781) 15e4505b Merge pull request #765 from JDepooter/unevaluated_items_with_mincontains_0 b8611c40 Extend URI and URI-reference tests 100e9823 Add tests for unevaluatedItems with minContains = 0 0be5549b Added tests to ensure date and time formats don't accept date-time formats git-subtree-dir: JSON-Schema-Test-Suite git-subtree-split: d69537acea93fd7481ad80ff3015d88ab0b13d5a
1 parent ee58e72 commit fcba997

163 files changed

Lines changed: 3500 additions & 1291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 15 additions & 13 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
@@ -335,13 +334,16 @@ Node-specific support is maintained in a [separate repository](https://github.co
335334
### Scala
336335

337336
* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations)
338-
* [typed-json](https://github.com/frawa/typed-json)
339337

340338
### Swift
341339

342340
* [JSONSchema](https://github.com/kylef/JSONSchema.swift)
343341
* [swift-json-schema](https://github.com/ajevans99/swift-json-schema)
344342

343+
### Unison
344+
345+
* [typed-json](https://share.unison-lang.org/@frawa/typed-json)
346+
345347
If you use it as well, please fork and send a pull request adding yourself to
346348
the list :).
347349

bin/annotate-specification-links

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def main():
7979
sys.stdout.write("::remove-matcher owner=me::\n")
8080

8181
for version in TESTS.iterdir():
82-
if version.name in {"draft-next", "latest"}:
82+
if version.name in {"v1", "latest"}:
8383
continue
8484

8585
version_urls = urls(version.name)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"description": "failed validation produces no annotations",
44
"schema": {
5-
"$schema": "https://json-schema.org/draft/next/schema",
6-
"$id": "https://json-schema.org/tests/content/draft-next/general/0",
5+
"$schema": "https://json-schema.org/v1",
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",
17-
"$ref": "/draft/next/output/schema",
16+
"$id": "https://json-schema.org/tests/content/v1/general/0/tests/0/basic",
17+
"$ref": "/v1/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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"description": "readOnly generates its value as an annotation",
44
"schema": {
5-
"$schema": "https://json-schema.org/draft/next/schema",
6-
"$id": "https://json-schema.org/tests/content/draft-next/readOnly/0",
5+
"$schema": "https://json-schema.org/v1",
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",
16-
"$ref": "/draft/next/output/schema",
15+
"$id": "https://json-schema.org/tests/content/v1/readOnly/0/tests/0/basic",
16+
"$ref": "/v1/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": {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"description": "incorrect type",
44
"schema": {
5-
"$schema": "https://json-schema.org/draft/next/schema",
6-
"$id": "https://json-schema.org/tests/content/draft-next/type/0",
5+
"$schema": "https://json-schema.org/v1",
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",
16-
"$ref": "/draft/next/output/schema",
15+
"$id": "https://json-schema.org/tests/content/v1/type/0/tests/0/basic",
16+
"$ref": "/v1/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": {

output-tests/draft-next/output-schema.json renamed to output-tests/v1/output-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://json-schema.org/draft/next/schema",
3-
"$id": "https://json-schema.org/draft/next/output/schema",
2+
"$schema": "https://json-schema.org/v1",
3+
"$id": "https://json-schema.org/v1/output/schema",
44
"description": "A schema that validates the minimum requirements for validation output",
55

66
"anyOf": [

remotes/draft-next/baseUriChange/folderInteger.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

remotes/draft-next/baseUriChangeFolder/folderInteger.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

remotes/draft-next/baseUriChangeFolderInSubschema/folderInteger.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

remotes/draft-next/format-assertion-false.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)