Skip to content

Commit 2f15a98

Browse files
committed
Merge commit '65802a7ebcd0b661c829307354ab0c24e1e05031'
* commit '65802a7ebcd0b661c829307354ab0c24e1e05031': Squashed 'json/' changes from 4cfead7ba..6eaf7dff4
2 parents 575e786 + 65802a7 commit 2f15a98

File tree

272 files changed

+3192
-584
lines changed

Some content is hidden

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

272 files changed

+3192
-584
lines changed

json/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ The precise steps described do not need to be followed exactly, but the results
103103

104104
To test a specific version:
105105

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"type": "integer"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"type": "integer"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"type": "integer"
4+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"description": "extendible array",
4+
"$id": "http://localhost:1234/draft-next/extendible-dynamic-ref.json",
5+
"type": "object",
6+
"properties": {
7+
"elements": {
8+
"type": "array",
9+
"items": {
10+
"$dynamicRef": "#elements"
11+
}
12+
}
13+
},
14+
"required": ["elements"],
15+
"additionalProperties": false,
16+
"$defs": {
17+
"elements": {
18+
"$dynamicAnchor": "elements"
19+
}
20+
}
21+
}

json/remotes/draft-next/integer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"type": "integer"
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"$defs": {
4+
"refToInteger": {
5+
"$ref": "#foo"
6+
},
7+
"A": {
8+
"$anchor": "foo",
9+
"type": "integer"
10+
}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"definitions": {
4+
"refToInteger": {
5+
"$ref": "#foo"
6+
},
7+
"A": {
8+
"id": "#foo",
9+
"type": "integer"
10+
}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"definitions": {
4+
"refToInteger": {
5+
"$ref": "#foo"
6+
},
7+
"A": {
8+
"$id": "#foo",
9+
"type": "integer"
10+
}
11+
}
12+
}

json/remotes/draft-next/metaschema-no-validation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
23
"$id": "http://localhost:1234/draft-next/metaschema-no-validation.json",
34
"$vocabulary": {
45
"https://json-schema.org/draft/next/vocab/applicator": true,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"$defs": {
4+
"orNull": {
5+
"anyOf": [
6+
{
7+
"type": "null"
8+
},
9+
{
10+
"$ref": "#"
11+
}
12+
]
13+
}
14+
},
15+
"type": "string"
16+
}

json/remotes/draft-next/name.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"definitions": {
4+
"orNull": {
5+
"anyOf": [
6+
{
7+
"type": "null"
8+
},
9+
{
10+
"$ref": "#"
11+
}
12+
]
13+
}
14+
},
15+
"type": "string"
16+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"type": "object",
4+
"properties": {
5+
"foo": {"$ref": "string.json"}
6+
}
7+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"type": "string"
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"$id": "http://localhost:1234/draft-next/ref-and-definitions.json",
4+
"definitions": {
5+
"inner": {
6+
"properties": {
7+
"bar": { "type": "string" }
8+
}
9+
}
10+
},
11+
"allOf": [ { "$ref": "#/definitions/inner" } ]
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"$id": "http://localhost:1234/draft-next/ref-and-defs.json",
4+
"$defs": {
5+
"inner": {
6+
"properties": {
7+
"bar": { "type": "string" }
8+
}
9+
}
10+
},
11+
"$ref": "#/$defs/inner"
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"$defs": {
4+
"integer": {
5+
"type": "integer"
6+
},
7+
"refToInteger": {
8+
"$ref": "#/$defs/integer"
9+
}
10+
}
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"integer": {
4+
"type": "integer"
5+
},
6+
"refToInteger": {
7+
"$ref": "#/integer"
8+
}
9+
}

json/remotes/draft-next/tree.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/next/schema",
3+
"description": "tree schema, extensible",
4+
"$id": "http://localhost:1234/draft-next/tree.json",
5+
"$dynamicAnchor": "node",
6+
7+
"type": "object",
8+
"properties": {
9+
"data": true,
10+
"children": {
11+
"type": "array",
12+
"items": {
13+
"$dynamicRef": "#node"
14+
}
15+
}
16+
}
17+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"type": "integer"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"type": "integer"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"type": "integer"
4+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"description": "extendible array",
3+
"$schema": "https://json-schema.org/draft/2019-09/schema",
4+
"$id": "http://localhost:1234/draft2019-09/extendible-dynamic-ref.json",
5+
"type": "object",
6+
"properties": {
7+
"elements": {
8+
"type": "array",
9+
"items": {
10+
"$dynamicRef": "#elements"
11+
}
12+
}
13+
},
14+
"required": ["elements"],
15+
"additionalProperties": false,
16+
"$defs": {
17+
"elements": {
18+
"$dynamicAnchor": "elements"
19+
}
20+
}
21+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"type": "integer"
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$defs": {
4+
"refToInteger": {
5+
"$ref": "#foo"
6+
},
7+
"A": {
8+
"$anchor": "foo",
9+
"type": "integer"
10+
}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"definitions": {
4+
"refToInteger": {
5+
"$ref": "#foo"
6+
},
7+
"A": {
8+
"id": "#foo",
9+
"type": "integer"
10+
}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"definitions": {
4+
"refToInteger": {
5+
"$ref": "#foo"
6+
},
7+
"A": {
8+
"$id": "#foo",
9+
"type": "integer"
10+
}
11+
}
12+
}

json/remotes/draft2019-09/metaschema-no-validation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
23
"$id": "http://localhost:1234/draft2019-09/metaschema-no-validation.json",
34
"$vocabulary": {
45
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$defs": {
4+
"orNull": {
5+
"anyOf": [
6+
{
7+
"type": "null"
8+
},
9+
{
10+
"$ref": "#"
11+
}
12+
]
13+
}
14+
},
15+
"type": "string"
16+
}

json/remotes/draft2019-09/name.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"definitions": {
4+
"orNull": {
5+
"anyOf": [
6+
{
7+
"type": "null"
8+
},
9+
{
10+
"$ref": "#"
11+
}
12+
]
13+
}
14+
},
15+
"type": "string"
16+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"type": "object",
4+
"properties": {
5+
"foo": {"$ref": "string.json"}
6+
}
7+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"type": "string"
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "http://localhost:1234/draft2019-09/ref-and-definitions.json",
4+
"definitions": {
5+
"inner": {
6+
"properties": {
7+
"bar": { "type": "string" }
8+
}
9+
}
10+
},
11+
"allOf": [ { "$ref": "#/definitions/inner" } ]
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "http://localhost:1234/draft2019-09/ref-and-defs.json",
4+
"$defs": {
5+
"inner": {
6+
"properties": {
7+
"bar": { "type": "string" }
8+
}
9+
}
10+
},
11+
"$ref": "#/$defs/inner"
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$defs": {
4+
"integer": {
5+
"type": "integer"
6+
},
7+
"refToInteger": {
8+
"$ref": "#/$defs/integer"
9+
}
10+
}
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"integer": {
4+
"type": "integer"
5+
},
6+
"refToInteger": {
7+
"$ref": "#/integer"
8+
}
9+
}

0 commit comments

Comments
 (0)