Skip to content

Commit 2f004ca

Browse files
committed
Squashed 'json/' changes from 9263b5250..20fb14bde
20fb14bde Merge pull request #537 from jimmylewis/removeInvalidTest d07162bcf Remove invalid draft6 test using draft7 constructs 26f74befc Add org badges 6e87b5bdb Merge pull request #529 from yakimun/remove-non-canonical-uris c5ba7b28f Replace non-canonical URIs with canonical ones 8d96d15fc Merge pull request #527 from johnnoone/patch-2 b7f657f77 Update vocabulary.json e82bfdfa5 s/future/next/ in schema reference git-subtree-dir: json git-subtree-split: 20fb14bde8f3c45a8933cd13283557c1b1fdf5b5
1 parent c9b7436 commit 2f004ca

File tree

9 files changed

+31
-35
lines changed

9 files changed

+31
-35
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# JSON Schema Test Suite [![Build Status](https://github.com/json-schema-org/JSON-Schema-Test-Suite/workflows/Test%20Suite%20Sanity%20Checking/badge.svg)](https://github.com/json-schema-org/JSON-Schema-Test-Suite/actions?query=workflow%3A%22Test+Suite+Sanity+Checking%22)
1+
# JSON Schema Test Suite
2+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/json-schema-org/.github/blob/main/CODE_OF_CONDUCT.md)
3+
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
4+
[![Financial Contributors on Open Collective](https://opencollective.com/json-schema/all/badge.svg?label=financial+contributors)](https://opencollective.com/json-schema)
5+
6+
[![Build Status](https://github.com/json-schema-org/JSON-Schema-Test-Suite/workflows/Test%20Suite%20Sanity%20Checking/badge.svg)](https://github.com/json-schema-org/JSON-Schema-Test-Suite/actions?query=workflow%3A%22Test+Suite+Sanity+Checking%22)
27

38
This repository contains a set of JSON objects that implementors of JSON Schema
49
validation libraries can use to test their validators.

tests/draft-next/defs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"description": "validate definition against metaschema",
44
"schema": {
5-
"$ref": "https://json-schema.org/draft/future/schema"
5+
"$ref": "https://json-schema.org/draft/next/schema"
66
},
77
"tests": [
88
{

tests/draft-next/dynamicRef.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,14 @@
362362
"title": "any type of node",
363363
"$id": "anyLeafNode",
364364
"$dynamicAnchor": "foo",
365-
"$ref": "main#/$defs/inner"
365+
"$ref": "inner"
366366
},
367367
"else": {
368368
"title": "integer node",
369369
"$id": "integerNode",
370370
"$dynamicAnchor": "foo",
371371
"type": [ "object", "integer" ],
372-
"$ref": "main#/$defs/inner"
372+
"$ref": "inner"
373373
}
374374
},
375375
"tests": [

tests/draft-next/vocabulary.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
},
2222
{
2323
"description": "no validation: valid number",
24-
"data": 20,
24+
"data": {
25+
"numberProperty": 20
26+
},
2527
"valid": true
2628
},
2729
{
2830
"description": "no validation: invalid number, but it still validates",
29-
"data": 1,
31+
"data": {
32+
"numberProperty": 1
33+
},
3034
"valid": true
3135
}
3236
]

tests/draft2019-09/recursiveRef.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,14 @@
330330
"title": "any type of node",
331331
"$id": "recursiveRef8_anyLeafNode.json",
332332
"$recursiveAnchor": true,
333-
"$ref": "recursiveRef8_main.json#/$defs/inner"
333+
"$ref": "recursiveRef8_inner.json"
334334
},
335335
"else": {
336336
"title": "integer node",
337337
"$id": "recursiveRef8_integerNode.json",
338338
"$recursiveAnchor": true,
339339
"type": [ "object", "integer" ],
340-
"$ref": "recursiveRef8_main.json#/$defs/inner"
340+
"$ref": "recursiveRef8_inner.json"
341341
}
342342
},
343343
"tests": [

tests/draft2019-09/vocabulary.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
},
2222
{
2323
"description": "no validation: valid number",
24-
"data": 20,
24+
"data": {
25+
"numberProperty": 20
26+
},
2527
"valid": true
2628
},
2729
{
2830
"description": "no validation: invalid number, but it still validates",
29-
"data": 1,
31+
"data": {
32+
"numberProperty": 1
33+
},
3034
"valid": true
3135
}
3236
]

tests/draft2020-12/dynamicRef.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,14 @@
362362
"title": "any type of node",
363363
"$id": "anyLeafNode",
364364
"$dynamicAnchor": "foo",
365-
"$ref": "main#/$defs/inner"
365+
"$ref": "inner"
366366
},
367367
"else": {
368368
"title": "integer node",
369369
"$id": "integerNode",
370370
"$dynamicAnchor": "foo",
371371
"type": [ "object", "integer" ],
372-
"$ref": "main#/$defs/inner"
372+
"$ref": "inner"
373373
}
374374
},
375375
"tests": [

tests/draft2020-12/vocabulary.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
},
2222
{
2323
"description": "no validation: valid number",
24-
"data": 20,
24+
"data": {
25+
"numberProperty": 20
26+
},
2527
"valid": true
2628
},
2729
{
2830
"description": "no validation: invalid number, but it still validates",
29-
"data": 1,
31+
"data": {
32+
"numberProperty": 1
33+
},
3034
"valid": true
3135
}
3236
]

tests/draft6/contains.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,5 @@
125125
"valid": false
126126
}
127127
]
128-
},
129-
{
130-
"description": "contains with false if subschema",
131-
"schema": {
132-
"contains": {
133-
"if": false,
134-
"else": true
135-
}
136-
},
137-
"tests": [
138-
{
139-
"description": "any non-empty array is valid",
140-
"data": ["foo"],
141-
"valid": true
142-
},
143-
{
144-
"description": "empty array is invalid",
145-
"data": [],
146-
"valid": false
147-
}
148-
]
149128
}
150129
]

0 commit comments

Comments
 (0)