summaryrefslogtreecommitdiff
path: root/json
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2022-01-04 08:34:21 +0000
committerJulian Berman <Julian@GrayVines.com>2022-01-04 08:34:21 +0000
commit67191bc5c3c60d4eba4ff2ce593433515fc9716f (patch)
treeca1df6826199c87b6793d3927e6580b9f867b64a /json
parent9534e07e28f81c60fd0d2e32194ff8fbc3345e5e (diff)
parent2f004cab9e731cc979b42fddfd1368818f73c4f6 (diff)
downloadjsonschema-67191bc5c3c60d4eba4ff2ce593433515fc9716f.tar.gz
Merge commit '2f004cab9e731cc979b42fddfd1368818f73c4f6'
* commit '2f004cab9e731cc979b42fddfd1368818f73c4f6': Squashed 'json/' changes from 9263b5250..20fb14bde
Diffstat (limited to 'json')
-rw-r--r--json/README.md7
-rw-r--r--json/tests/draft-next/defs.json2
-rw-r--r--json/tests/draft-next/dynamicRef.json4
-rw-r--r--json/tests/draft-next/vocabulary.json8
-rw-r--r--json/tests/draft2019-09/recursiveRef.json4
-rw-r--r--json/tests/draft2019-09/vocabulary.json8
-rw-r--r--json/tests/draft2020-12/dynamicRef.json4
-rw-r--r--json/tests/draft2020-12/vocabulary.json8
-rw-r--r--json/tests/draft6/contains.json21
9 files changed, 31 insertions, 35 deletions
diff --git a/json/README.md b/json/README.md
index a00e38c..016fdd1 100644
--- a/json/README.md
+++ b/json/README.md
@@ -1,4 +1,9 @@
-# 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)
+# JSON Schema Test Suite
+[![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)
+[![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)
+[![Financial Contributors on Open Collective](https://opencollective.com/json-schema/all/badge.svg?label=financial+contributors)](https://opencollective.com/json-schema)
+
+[![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)
This repository contains a set of JSON objects that implementors of JSON Schema
validation libraries can use to test their validators.
diff --git a/json/tests/draft-next/defs.json b/json/tests/draft-next/defs.json
index 5dcdca6..1282164 100644
--- a/json/tests/draft-next/defs.json
+++ b/json/tests/draft-next/defs.json
@@ -2,7 +2,7 @@
{
"description": "validate definition against metaschema",
"schema": {
- "$ref": "https://json-schema.org/draft/future/schema"
+ "$ref": "https://json-schema.org/draft/next/schema"
},
"tests": [
{
diff --git a/json/tests/draft-next/dynamicRef.json b/json/tests/draft-next/dynamicRef.json
index f420542..618d836 100644
--- a/json/tests/draft-next/dynamicRef.json
+++ b/json/tests/draft-next/dynamicRef.json
@@ -362,14 +362,14 @@
"title": "any type of node",
"$id": "anyLeafNode",
"$dynamicAnchor": "foo",
- "$ref": "main#/$defs/inner"
+ "$ref": "inner"
},
"else": {
"title": "integer node",
"$id": "integerNode",
"$dynamicAnchor": "foo",
"type": [ "object", "integer" ],
- "$ref": "main#/$defs/inner"
+ "$ref": "inner"
}
},
"tests": [
diff --git a/json/tests/draft-next/vocabulary.json b/json/tests/draft-next/vocabulary.json
index b6997b4..d84f8f1 100644
--- a/json/tests/draft-next/vocabulary.json
+++ b/json/tests/draft-next/vocabulary.json
@@ -21,12 +21,16 @@
},
{
"description": "no validation: valid number",
- "data": 20,
+ "data": {
+ "numberProperty": 20
+ },
"valid": true
},
{
"description": "no validation: invalid number, but it still validates",
- "data": 1,
+ "data": {
+ "numberProperty": 1
+ },
"valid": true
}
]
diff --git a/json/tests/draft2019-09/recursiveRef.json b/json/tests/draft2019-09/recursiveRef.json
index 0a2ae60..ebb098c 100644
--- a/json/tests/draft2019-09/recursiveRef.json
+++ b/json/tests/draft2019-09/recursiveRef.json
@@ -330,14 +330,14 @@
"title": "any type of node",
"$id": "recursiveRef8_anyLeafNode.json",
"$recursiveAnchor": true,
- "$ref": "recursiveRef8_main.json#/$defs/inner"
+ "$ref": "recursiveRef8_inner.json"
},
"else": {
"title": "integer node",
"$id": "recursiveRef8_integerNode.json",
"$recursiveAnchor": true,
"type": [ "object", "integer" ],
- "$ref": "recursiveRef8_main.json#/$defs/inner"
+ "$ref": "recursiveRef8_inner.json"
}
},
"tests": [
diff --git a/json/tests/draft2019-09/vocabulary.json b/json/tests/draft2019-09/vocabulary.json
index 79c3ad8..982e673 100644
--- a/json/tests/draft2019-09/vocabulary.json
+++ b/json/tests/draft2019-09/vocabulary.json
@@ -21,12 +21,16 @@
},
{
"description": "no validation: valid number",
- "data": 20,
+ "data": {
+ "numberProperty": 20
+ },
"valid": true
},
{
"description": "no validation: invalid number, but it still validates",
- "data": 1,
+ "data": {
+ "numberProperty": 1
+ },
"valid": true
}
]
diff --git a/json/tests/draft2020-12/dynamicRef.json b/json/tests/draft2020-12/dynamicRef.json
index f420542..618d836 100644
--- a/json/tests/draft2020-12/dynamicRef.json
+++ b/json/tests/draft2020-12/dynamicRef.json
@@ -362,14 +362,14 @@
"title": "any type of node",
"$id": "anyLeafNode",
"$dynamicAnchor": "foo",
- "$ref": "main#/$defs/inner"
+ "$ref": "inner"
},
"else": {
"title": "integer node",
"$id": "integerNode",
"$dynamicAnchor": "foo",
"type": [ "object", "integer" ],
- "$ref": "main#/$defs/inner"
+ "$ref": "inner"
}
},
"tests": [
diff --git a/json/tests/draft2020-12/vocabulary.json b/json/tests/draft2020-12/vocabulary.json
index b6997b4..d84f8f1 100644
--- a/json/tests/draft2020-12/vocabulary.json
+++ b/json/tests/draft2020-12/vocabulary.json
@@ -21,12 +21,16 @@
},
{
"description": "no validation: valid number",
- "data": 20,
+ "data": {
+ "numberProperty": 20
+ },
"valid": true
},
{
"description": "no validation: invalid number, but it still validates",
- "data": 1,
+ "data": {
+ "numberProperty": 1
+ },
"valid": true
}
]
diff --git a/json/tests/draft6/contains.json b/json/tests/draft6/contains.json
index 215da98..c5471cc 100644
--- a/json/tests/draft6/contains.json
+++ b/json/tests/draft6/contains.json
@@ -125,26 +125,5 @@
"valid": false
}
]
- },
- {
- "description": "contains with false if subschema",
- "schema": {
- "contains": {
- "if": false,
- "else": true
- }
- },
- "tests": [
- {
- "description": "any non-empty array is valid",
- "data": ["foo"],
- "valid": true
- },
- {
- "description": "empty array is invalid",
- "data": [],
- "valid": false
- }
- ]
}
]