Skip to content

Commit

Permalink
Merge commit '75f09dc062084528d31018e9297dab132a997590'
Browse files Browse the repository at this point in the history
* commit '75f09dc062084528d31018e9297dab132a997590':
  Squashed 'json/' changes from a9a1e2e..95fe6ca
  • Loading branch information
Julian committed Oct 30, 2023
2 parents aaee6f4 + 75f09dc commit d9be1a4
Show file tree
Hide file tree
Showing 27 changed files with 247 additions and 129 deletions.
26 changes: 0 additions & 26 deletions json/output-tests/draft2019-09/content/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,6 @@
"required": ["errors"]
}
}
},
{
"description": "correct type yields an output unit",
"data": "a string",
"output": {
"basic": {
"$id": "https://json-schema.org/tests/content/draft2019-09/type/0/tests/1/basic",
"$ref": "/draft/2019-09/output/schema",
"properties": {
"annotations": {
"contains": {
"properties": {
"valid": {"const": true},
"keywordLocation": {"const": "/type"},
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2019-09/type/0#/type"},
"instanceLocation": {"const": ""},
"annotation": false,
"error": false
},
"required": ["keywordLocation", "instanceLocation"]
}
}
},
"required": ["annotations"]
}
}
}
]
}
Expand Down
26 changes: 0 additions & 26 deletions json/output-tests/draft2020-12/content/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,6 @@
"required": ["errors"]
}
}
},
{
"description": "correct type yields an output unit",
"data": "a string",
"output": {
"basic": {
"$id": "https://json-schema.org/tests/content/draft2020-12/type/0/tests/1/basic",
"$ref": "/draft/2020-12/output/schema",
"properties": {
"annotations": {
"contains": {
"properties": {
"valid": {"const": true},
"keywordLocation": {"const": "/type"},
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/type/0#/type"},
"instanceLocation": {"const": ""},
"annotation": false,
"error": false
},
"required": ["keywordLocation", "instanceLocation"]
}
}
},
"required": ["annotations"]
}
}
}
]
}
Expand Down
11 changes: 0 additions & 11 deletions json/remotes/draft-next/subSchemas-defs.json

This file was deleted.

12 changes: 7 additions & 5 deletions json/remotes/draft-next/subSchemas.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/integer"
"$defs": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/$defs/integer"
}
}
}
11 changes: 0 additions & 11 deletions json/remotes/draft2019-09/subSchemas-defs.json

This file was deleted.

12 changes: 7 additions & 5 deletions json/remotes/draft2019-09/subSchemas.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/integer"
"$defs": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/$defs/integer"
}
}
}
11 changes: 0 additions & 11 deletions json/remotes/draft2020-12/subSchemas-defs.json

This file was deleted.

12 changes: 7 additions & 5 deletions json/remotes/draft2020-12/subSchemas.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/integer"
"$defs": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/$defs/integer"
}
}
}
10 changes: 0 additions & 10 deletions json/remotes/subSchemas-defs.json

This file was deleted.

12 changes: 7 additions & 5 deletions json/remotes/subSchemas.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/integer"
"definitions": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/definitions/integer"
}
}
}
20 changes: 20 additions & 0 deletions json/tests/draft-next/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,26 @@
}
]
},
{
"description": "items with heterogeneous array",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"prefixItems": [{}],
"items": false
},
"tests": [
{
"description": "heterogeneous invalid instance",
"data": [ "foo", "bar", 37 ],
"valid": false
},
{
"description": "valid instance",
"data": [ null ],
"valid": true
}
]
},
{
"description": "items with null instance elements",
"schema": {
Expand Down
23 changes: 23 additions & 0 deletions json/tests/draft-next/optional/refOfUnknownKeyword.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,28 @@
"valid": false
}
]
},
{
"description": "reference internals of known non-applicator",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "/base",
"examples": [
{ "type": "string" }
],
"$ref": "#/examples/0"
},
"tests": [
{
"description": "match",
"data": "a string",
"valid": true
},
{
"description": "mismatch",
"data": 42,
"valid": false
}
]
}
]
4 changes: 2 additions & 2 deletions json/tests/draft-next/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "fragment within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/draft-next/subSchemas-defs.json#/$defs/integer"
"$ref": "http://localhost:1234/draft-next/subSchemas.json#/$defs/integer"
},
"tests": [
{
Expand Down Expand Up @@ -60,7 +60,7 @@
"description": "ref within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/draft-next/subSchemas-defs.json#/$defs/refToInteger"
"$ref": "http://localhost:1234/draft-next/subSchemas.json#/$defs/refToInteger"
},
"tests": [
{
Expand Down
20 changes: 20 additions & 0 deletions json/tests/draft2019-09/additionalItems.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,26 @@
}
]
},
{
"description": "additionalItems with heterogeneous array",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"items": [{}],
"additionalItems": false
},
"tests": [
{
"description": "heterogeneous invalid instance",
"data": [ "foo", "bar", 37 ],
"valid": false
},
{
"description": "valid instance",
"data": [ null ],
"valid": true
}
]
},
{
"description": "additionalItems with null instance elements",
"schema": {
Expand Down
23 changes: 23 additions & 0 deletions json/tests/draft2019-09/optional/refOfUnknownKeyword.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,28 @@
"valid": false
}
]
},
{
"description": "reference internals of known non-applicator",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "/base",
"examples": [
{ "type": "string" }
],
"$ref": "#/examples/0"
},
"tests": [
{
"description": "match",
"data": "a string",
"valid": true
},
{
"description": "mismatch",
"data": 42,
"valid": false
}
]
}
]
4 changes: 2 additions & 2 deletions json/tests/draft2019-09/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "fragment within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://localhost:1234/draft2019-09/subSchemas-defs.json#/$defs/integer"
"$ref": "http://localhost:1234/draft2019-09/subSchemas.json#/$defs/integer"
},
"tests": [
{
Expand Down Expand Up @@ -60,7 +60,7 @@
"description": "ref within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://localhost:1234/draft2019-09/subSchemas-defs.json#/$defs/refToInteger"
"$ref": "http://localhost:1234/draft2019-09/subSchemas.json#/$defs/refToInteger"
},
"tests": [
{
Expand Down
20 changes: 20 additions & 0 deletions json/tests/draft2020-12/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,26 @@
}
]
},
{
"description": "items with heterogeneous array",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"prefixItems": [{}],
"items": false
},
"tests": [
{
"description": "heterogeneous invalid instance",
"data": [ "foo", "bar", 37 ],
"valid": false
},
{
"description": "valid instance",
"data": [ null ],
"valid": true
}
]
},
{
"description": "items with null instance elements",
"schema": {
Expand Down
23 changes: 23 additions & 0 deletions json/tests/draft2020-12/optional/refOfUnknownKeyword.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,28 @@
"valid": false
}
]
},
{
"description": "reference internals of known non-applicator",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/base",
"examples": [
{ "type": "string" }
],
"$ref": "#/examples/0"
},
"tests": [
{
"description": "match",
"data": "a string",
"valid": true
},
{
"description": "mismatch",
"data": 42,
"valid": false
}
]
}
]
Loading

0 comments on commit d9be1a4

Please sign in to comment.