summaryrefslogtreecommitdiff
path: root/json/output-tests/draft2020-12
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2023-01-20 14:14:21 -0500
committerJulian Berman <Julian@GrayVines.com>2023-01-20 14:14:21 -0500
commitdae554c22c8dce3bd084e3e503060b92a4839385 (patch)
tree119ab374412670a6324af5d7dd0414b243eafe97 /json/output-tests/draft2020-12
parentb82b24a083ec88541191b5b9852291f25075fe07 (diff)
downloadjsonschema-dae554c22c8dce3bd084e3e503060b92a4839385.tar.gz
Squashed 'json/' changes from d21ed578a..f57d3e0cc
f57d3e0cc Merge pull request #631 from json-schema-org/if-then-else-ref 3b8c281ff Ensure $ids are collected within if/then/else schemas. 02905b21b Fix a sloppy bug in the sanity checks in CI. git-subtree-dir: json git-subtree-split: f57d3e0ccb365a198fabe060aae2407af6adcff9
Diffstat (limited to 'json/output-tests/draft2020-12')
-rw-r--r--json/output-tests/draft2020-12/content/general.json34
-rw-r--r--json/output-tests/draft2020-12/content/readOnly.json37
-rw-r--r--json/output-tests/draft2020-12/content/type.json63
-rw-r--r--json/output-tests/draft2020-12/output-schema.json96
4 files changed, 0 insertions, 230 deletions
diff --git a/json/output-tests/draft2020-12/content/general.json b/json/output-tests/draft2020-12/content/general.json
deleted file mode 100644
index 1f2b370..0000000
--- a/json/output-tests/draft2020-12/content/general.json
+++ /dev/null
@@ -1,34 +0,0 @@
-[
- {
- "description": "failed validation produces no annotations",
- "schema": {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://json-schema.org/tests/content/draft2020-12/general/0",
- "type": "string",
- "readOnly": true
- },
- "tests": [
- {
- "description": "readOnly annotation is dropped",
- "data": 1,
- "output": {
- "basic": {
- "$id": "https://json-schema.org/tests/content/draft2020-12/general/0/tests/0/basic",
- "$ref": "/draft/2020-12/output/schema",
- "properties": {
- "errors": {
- "items": {
- "properties": {
- "annotation": false
- }
- }
- },
- "annotations": false
- },
- "required": ["errors"]
- }
- }
- }
- ]
- }
-]
diff --git a/json/output-tests/draft2020-12/content/readOnly.json b/json/output-tests/draft2020-12/content/readOnly.json
deleted file mode 100644
index 9baf48d..0000000
--- a/json/output-tests/draft2020-12/content/readOnly.json
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- "description": "readOnly generates its value as an annotation",
- "schema": {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://json-schema.org/tests/content/draft2020-12/readOnly/0",
- "readOnly": true
- },
- "tests": [
- {
- "description": "readOnly is true",
- "data": 1,
- "output": {
- "basic": {
- "$id": "https://json-schema.org/tests/content/draft2020-12/readOnly/0/tests/0/basic",
- "$ref": "/draft/2020-12/output/schema",
- "properties": {
- "annotations": {
- "contains": {
- "properties": {
- "keywordLocation": {"const": "/readOnly"},
- "absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/readOnly/0#/readOnly"},
- "instanceLocation": {"const": ""},
- "annotation": {"const": true}
- },
- "required": ["keywordLocation", "instanceLocation", "annotation"]
- }
- },
- "errors": false
- },
- "required": ["annotations"]
- }
- }
- }
- ]
- }
-]
diff --git a/json/output-tests/draft2020-12/content/type.json b/json/output-tests/draft2020-12/content/type.json
deleted file mode 100644
index 710475b..0000000
--- a/json/output-tests/draft2020-12/content/type.json
+++ /dev/null
@@ -1,63 +0,0 @@
-[
- {
- "description": "validating type",
- "schema": {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://json-schema.org/tests/content/draft2020-12/type/0",
- "type": "string",
- "anyOf": [ true ]
- },
- "tests": [
- {
- "description": "incorrect type must be reported, but a message is not required",
- "data": 1,
- "output": {
- "basic": {
- "$id": "https://json-schema.org/tests/content/draft2020-12/type/0/tests/0/basic",
- "$ref": "/draft/2020-12/output/schema",
- "properties": {
- "errors": {
- "contains": {
- "properties": {
- "keywordLocation": {"const": "/type"},
- "absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/type/0#/type"},
- "instanceLocation": {"const": ""},
- "annotation": false
- },
- "required": ["keywordLocation", "instanceLocation"]
- }
- }
- },
- "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"]
- }
- }
- }
- ]
- }
-]
diff --git a/json/output-tests/draft2020-12/output-schema.json b/json/output-tests/draft2020-12/output-schema.json
deleted file mode 100644
index 1eef288..0000000
--- a/json/output-tests/draft2020-12/output-schema.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://json-schema.org/draft/2020-12/output/schema",
- "description": "A schema that validates the minimum requirements for validation output",
-
- "anyOf": [
- { "$ref": "#/$defs/flag" },
- { "$ref": "#/$defs/basic" },
- { "$ref": "#/$defs/detailed" },
- { "$ref": "#/$defs/verbose" }
- ],
- "$defs": {
- "outputUnit":{
- "properties": {
- "valid": { "type": "boolean" },
- "keywordLocation": {
- "type": "string",
- "format": "json-pointer"
- },
- "absoluteKeywordLocation": {
- "type": "string",
- "format": "uri"
- },
- "instanceLocation": {
- "type": "string",
- "format": "json-pointer"
- },
- "error": {
- "type": "string"
- },
- "errors": {
- "$ref": "#/$defs/outputUnitArray"
- },
- "annotations": {
- "$ref": "#/$defs/outputUnitArray"
- }
- },
- "required": [ "valid", "keywordLocation", "instanceLocation" ],
- "allOf": [
- {
- "if": {
- "properties": {
- "valid": { "const": false }
- }
- },
- "then": {
- "anyOf": [
- {
- "required": [ "error" ]
- },
- {
- "required": [ "errors" ]
- }
- ]
- }
- },
- {
- "if": {
- "anyOf": [
- {
- "properties": {
- "keywordLocation": {
- "pattern": "/\\$ref/"
- }
- }
- },
- {
- "properties": {
- "keywordLocation": {
- "pattern": "/\\$dynamicRef/"
- }
- }
- }
- ]
- },
- "then": {
- "required": [ "absoluteKeywordLocation" ]
- }
- }
- ]
- },
- "outputUnitArray": {
- "type": "array",
- "items": { "$ref": "#/$defs/outputUnit" }
- },
- "flag": {
- "properties": {
- "valid": { "type": "boolean" }
- },
- "required": [ "valid" ]
- },
- "basic": { "$ref": "#/$defs/outputUnit" },
- "detailed": { "$ref": "#/$defs/outputUnit" },
- "verbose": { "$ref": "#/$defs/outputUnit" }
- }
-}