Skip to content

Commit

Permalink
Squashed 'json/' changes from 4cfead7ba..6eaf7dff4
Browse files Browse the repository at this point in the history
6eaf7dff4 Merge pull request #586 from handrews/dollar-schema
b5270c56e Update all draft-next $schema, $id, $ref.
dd343685e Copy remotes to draft-next without changes.
8919ce99b Add $schema to optional/format 2019-09 tests
d88c04ff5 Add $schema for optional/format 2020-12
da237da59 draft-specific 2020-12 remotes, $refs, and $ids
0eb6893f4 draft-specific 2019-09 remotes, $refs, and $ids
c0ba85b60 Remove accidental duplication
e8851f1a9 Add "$schema" to all document roots
8d653be4d Copy remotes to draft dirs, no changes yet
113a08e5c Optional tests for no $schema (2019-09+)
909835901 Update README to reflect $schema detection
be49e5b07 Add $schema to all 2019-09 tests
64793fe67 Add $schema for all 2020-12 tests.

git-subtree-dir: json
git-subtree-split: 6eaf7dff43b81e78bd10658b3dd917bf0b345ab1
  • Loading branch information
Julian committed Aug 31, 2022
1 parent af8abbb commit 65802a7
Show file tree
Hide file tree
Showing 272 changed files with 3,192 additions and 584 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ The precise steps described do not need to be followed exactly, but the results

To test a specific version:

* 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
* 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
* Load any remote references [described below](additional-assumptions) and configure your implementation to retrieve them via their URIs
* Walk the filesystem tree for that version's subdirectory and for each `.json` file found:

Expand Down
4 changes: 4 additions & 0 deletions remotes/draft-next/baseUriChange/folderInteger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"type": "integer"
}
4 changes: 4 additions & 0 deletions remotes/draft-next/baseUriChangeFolder/folderInteger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"type": "integer"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"type": "integer"
}
21 changes: 21 additions & 0 deletions remotes/draft-next/extendible-dynamic-ref.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"description": "extendible array",
"$id": "http://localhost:1234/draft-next/extendible-dynamic-ref.json",
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"$dynamicRef": "#elements"
}
}
},
"required": ["elements"],
"additionalProperties": false,
"$defs": {
"elements": {
"$dynamicAnchor": "elements"
}
}
}
4 changes: 4 additions & 0 deletions remotes/draft-next/integer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"type": "integer"
}
12 changes: 12 additions & 0 deletions remotes/draft-next/locationIndependentIdentifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$defs": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"$anchor": "foo",
"type": "integer"
}
}
}
12 changes: 12 additions & 0 deletions remotes/draft-next/locationIndependentIdentifierDraft4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"definitions": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"id": "#foo",
"type": "integer"
}
}
}
12 changes: 12 additions & 0 deletions remotes/draft-next/locationIndependentIdentifierPre2019.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"definitions": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"$id": "#foo",
"type": "integer"
}
}
}
1 change: 1 addition & 0 deletions remotes/draft-next/metaschema-no-validation.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "http://localhost:1234/draft-next/metaschema-no-validation.json",
"$vocabulary": {
"https://json-schema.org/draft/next/vocab/applicator": true,
Expand Down
16 changes: 16 additions & 0 deletions remotes/draft-next/name-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$defs": {
"orNull": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#"
}
]
}
},
"type": "string"
}
16 changes: 16 additions & 0 deletions remotes/draft-next/name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"definitions": {
"orNull": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#"
}
]
}
},
"type": "string"
}
7 changes: 7 additions & 0 deletions remotes/draft-next/nested/foo-ref-string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"type": "object",
"properties": {
"foo": {"$ref": "string.json"}
}
}
4 changes: 4 additions & 0 deletions remotes/draft-next/nested/string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"type": "string"
}
12 changes: 12 additions & 0 deletions remotes/draft-next/ref-and-definitions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "http://localhost:1234/draft-next/ref-and-definitions.json",
"definitions": {
"inner": {
"properties": {
"bar": { "type": "string" }
}
}
},
"allOf": [ { "$ref": "#/definitions/inner" } ]
}
12 changes: 12 additions & 0 deletions remotes/draft-next/ref-and-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "http://localhost:1234/draft-next/ref-and-defs.json",
"$defs": {
"inner": {
"properties": {
"bar": { "type": "string" }
}
}
},
"$ref": "#/$defs/inner"
}
11 changes: 11 additions & 0 deletions remotes/draft-next/subSchemas-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$defs": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/$defs/integer"
}
}
}
9 changes: 9 additions & 0 deletions remotes/draft-next/subSchemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/integer"
}
}
17 changes: 17 additions & 0 deletions remotes/draft-next/tree.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"description": "tree schema, extensible",
"$id": "http://localhost:1234/draft-next/tree.json",
"$dynamicAnchor": "node",

"type": "object",
"properties": {
"data": true,
"children": {
"type": "array",
"items": {
"$dynamicRef": "#node"
}
}
}
}
4 changes: 4 additions & 0 deletions remotes/draft2019-09/baseUriChange/folderInteger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "integer"
}
4 changes: 4 additions & 0 deletions remotes/draft2019-09/baseUriChangeFolder/folderInteger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "integer"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "integer"
}
21 changes: 21 additions & 0 deletions remotes/draft2019-09/extendible-dynamic-ref.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "extendible array",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://localhost:1234/draft2019-09/extendible-dynamic-ref.json",
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"$dynamicRef": "#elements"
}
}
},
"required": ["elements"],
"additionalProperties": false,
"$defs": {
"elements": {
"$dynamicAnchor": "elements"
}
}
}
4 changes: 4 additions & 0 deletions remotes/draft2019-09/integer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "integer"
}
12 changes: 12 additions & 0 deletions remotes/draft2019-09/locationIndependentIdentifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$defs": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"$anchor": "foo",
"type": "integer"
}
}
}
12 changes: 12 additions & 0 deletions remotes/draft2019-09/locationIndependentIdentifierDraft4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"definitions": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"id": "#foo",
"type": "integer"
}
}
}
12 changes: 12 additions & 0 deletions remotes/draft2019-09/locationIndependentIdentifierPre2019.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"definitions": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"$id": "#foo",
"type": "integer"
}
}
}
1 change: 1 addition & 0 deletions remotes/draft2019-09/metaschema-no-validation.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://localhost:1234/draft2019-09/metaschema-no-validation.json",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
Expand Down
16 changes: 16 additions & 0 deletions remotes/draft2019-09/name-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$defs": {
"orNull": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#"
}
]
}
},
"type": "string"
}
16 changes: 16 additions & 0 deletions remotes/draft2019-09/name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"definitions": {
"orNull": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#"
}
]
}
},
"type": "string"
}
7 changes: 7 additions & 0 deletions remotes/draft2019-09/nested/foo-ref-string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties": {
"foo": {"$ref": "string.json"}
}
}
4 changes: 4 additions & 0 deletions remotes/draft2019-09/nested/string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "string"
}
12 changes: 12 additions & 0 deletions remotes/draft2019-09/ref-and-definitions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://localhost:1234/draft2019-09/ref-and-definitions.json",
"definitions": {
"inner": {
"properties": {
"bar": { "type": "string" }
}
}
},
"allOf": [ { "$ref": "#/definitions/inner" } ]
}
12 changes: 12 additions & 0 deletions remotes/draft2019-09/ref-and-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://localhost:1234/draft2019-09/ref-and-defs.json",
"$defs": {
"inner": {
"properties": {
"bar": { "type": "string" }
}
}
},
"$ref": "#/$defs/inner"
}
11 changes: 11 additions & 0 deletions remotes/draft2019-09/subSchemas-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$defs": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/$defs/integer"
}
}
}
9 changes: 9 additions & 0 deletions remotes/draft2019-09/subSchemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/integer"
}
}
Loading

0 comments on commit 65802a7

Please sign in to comment.