added realm to jspg processing

This commit is contained in:
2026-04-17 18:25:14 -04:00
parent 8ebf6a69bf
commit f450f8ab8b
59 changed files with 3884 additions and 2194 deletions

View File

@ -2,21 +2,26 @@
{
"description": "additionalProperties validates properties not matched by properties",
"database": {
"schemas": {
"schema1": {
"properties": {
"foo": {
"type": "string"
},
"bar": {
"type": "number"
"types": [
{
"name": "schema1",
"schemas": {
"schema1": {
"properties": {
"foo": {
"type": "string"
},
"bar": {
"type": "number"
}
},
"additionalProperties": {
"type": "boolean"
}
}
},
"additionalProperties": {
"type": "boolean"
}
}
}
]
},
"tests": [
{
@ -61,19 +66,24 @@
{
"description": "extensible: true with additionalProperties still validates structure",
"database": {
"schemas": {
"additionalProperties_1_0": {
"properties": {
"foo": {
"type": "string"
"types": [
{
"name": "additionalProperties_1_0",
"schemas": {
"additionalProperties_1_0": {
"properties": {
"foo": {
"type": "string"
}
},
"extensible": true,
"additionalProperties": {
"type": "integer"
}
}
},
"extensible": true,
"additionalProperties": {
"type": "integer"
}
}
}
]
},
"tests": [
{
@ -106,21 +116,26 @@
{
"description": "complex additionalProperties with object and array items",
"database": {
"schemas": {
"schema3": {
"properties": {
"type": {
"type": "string"
}
},
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
"types": [
{
"name": "schema3",
"schemas": {
"schema3": {
"properties": {
"type": {
"type": "string"
}
},
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,9 +2,14 @@
{
"description": "boolean schema 'true'",
"database": {
"schemas": {
"booleanSchema_0_0": {}
}
"types": [
{
"name": "booleanSchema_0_0",
"schemas": {
"booleanSchema_0_0": {}
}
}
]
},
"tests": [
{
@ -97,11 +102,16 @@
{
"description": "boolean schema 'false'",
"database": {
"schemas": {
"booleanSchema_1_0": {
"not": {}
"types": [
{
"name": "booleanSchema_1_0",
"schemas": {
"booleanSchema_1_0": {
"not": {}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,218 +2,238 @@
{
"description": "Multi-Paradigm Declarative Cases",
"database": {
"schemas": {
"parallel_rules": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"kind": {
"type": "string"
}
},
"cases": [
{
"when": {
"properties": {
"status": {
"const": "unverified"
}
"types": [
{
"name": "parallel_rules",
"schemas": {
"parallel_rules": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"required": [
"status"
]
"kind": {
"type": "string"
}
},
"then": {
"properties": {
"amount_1": {
"type": "number"
"cases": [
{
"when": {
"properties": {
"status": {
"const": "unverified"
}
},
"required": [
"status"
]
},
"amount_2": {
"type": "number"
}
},
"required": [
"amount_1",
"amount_2"
]
}
},
{
"when": {
"properties": {
"kind": {
"const": "credit"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"cvv": {
"type": "number"
}
},
"required": [
"cvv"
]
}
}
]
},
"mutually_exclusive": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"cases": [
{
"when": {
"properties": {
"type": {
"const": "A"
}
},
"required": [
"type"
]
},
"then": {
"properties": {
"field_a": {
"type": "number"
}
},
"required": [
"field_a"
]
}
},
{
"when": {
"properties": {
"type": {
"const": "B"
}
},
"required": [
"type"
]
},
"then": {
"properties": {
"field_b": {
"type": "number"
}
},
"required": [
"field_b"
]
},
"else": {
"properties": {
"fallback_b": {
"type": "number"
}
},
"required": [
"fallback_b"
]
}
}
]
},
"nested_fallbacks": {
"type": "object",
"properties": {
"tier": {
"type": "string"
}
},
"cases": [
{
"when": {
"properties": {
"tier": {
"const": "1"
}
},
"required": [
"tier"
]
},
"then": {
"properties": {
"basic": {
"type": "number"
}
},
"required": [
"basic"
]
},
"else": {
"cases": [
{
"when": {
"properties": {
"tier": {
"const": "2"
}
"then": {
"properties": {
"amount_1": {
"type": "number"
},
"required": [
"tier"
]
"amount_2": {
"type": "number"
}
},
"then": {
"properties": {
"standard": {
"type": "number"
}
},
"required": [
"standard"
]
},
"else": {
"properties": {
"premium": {
"type": "number"
}
},
"required": [
"premium"
]
}
}
]
}
}
]
},
"missing_when": {
"type": "object",
"cases": [
{
"else": {
"properties": {
"unconditional": {
"type": "number"
"required": [
"amount_1",
"amount_2"
]
}
},
"required": [
"unconditional"
]
}
{
"when": {
"properties": {
"kind": {
"const": "credit"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"cvv": {
"type": "number"
}
},
"required": [
"cvv"
]
}
}
]
}
]
}
},
{
"name": "mutually_exclusive",
"schemas": {
"mutually_exclusive": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"cases": [
{
"when": {
"properties": {
"type": {
"const": "A"
}
},
"required": [
"type"
]
},
"then": {
"properties": {
"field_a": {
"type": "number"
}
},
"required": [
"field_a"
]
}
},
{
"when": {
"properties": {
"type": {
"const": "B"
}
},
"required": [
"type"
]
},
"then": {
"properties": {
"field_b": {
"type": "number"
}
},
"required": [
"field_b"
]
},
"else": {
"properties": {
"fallback_b": {
"type": "number"
}
},
"required": [
"fallback_b"
]
}
}
]
}
}
},
{
"name": "nested_fallbacks",
"schemas": {
"nested_fallbacks": {
"type": "object",
"properties": {
"tier": {
"type": "string"
}
},
"cases": [
{
"when": {
"properties": {
"tier": {
"const": "1"
}
},
"required": [
"tier"
]
},
"then": {
"properties": {
"basic": {
"type": "number"
}
},
"required": [
"basic"
]
},
"else": {
"cases": [
{
"when": {
"properties": {
"tier": {
"const": "2"
}
},
"required": [
"tier"
]
},
"then": {
"properties": {
"standard": {
"type": "number"
}
},
"required": [
"standard"
]
},
"else": {
"properties": {
"premium": {
"type": "number"
}
},
"required": [
"premium"
]
}
}
]
}
}
]
}
}
},
{
"name": "missing_when",
"schemas": {
"missing_when": {
"type": "object",
"cases": [
{
"else": {
"properties": {
"unconditional": {
"type": "number"
}
},
"required": [
"unconditional"
]
}
}
]
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "const validation",
"database": {
"schemas": {
"const_0_0": {
"const": 2
"types": [
{
"name": "const_0_0",
"schemas": {
"const_0_0": {
"const": 2
}
}
}
}
]
},
"tests": [
{
@ -41,18 +46,23 @@
{
"description": "const with object",
"database": {
"schemas": {
"const_1_0": {
"const": {
"foo": "bar",
"baz": "bax"
},
"properties": {
"foo": {},
"baz": {}
"types": [
{
"name": "const_1_0",
"schemas": {
"const_1_0": {
"const": {
"foo": "bar",
"baz": "bax"
},
"properties": {
"foo": {},
"baz": {}
}
}
}
}
}
]
},
"tests": [
{
@ -107,15 +117,20 @@
{
"description": "const with array",
"database": {
"schemas": {
"const_2_0": {
"const": [
{
"foo": "bar"
"types": [
{
"name": "const_2_0",
"schemas": {
"const_2_0": {
"const": [
{
"foo": "bar"
}
]
}
]
}
}
}
]
},
"tests": [
{
@ -160,11 +175,16 @@
{
"description": "const with null",
"database": {
"schemas": {
"const_3_0": {
"const": null
"types": [
{
"name": "const_3_0",
"schemas": {
"const_3_0": {
"const": null
}
}
}
}
]
},
"tests": [
{
@ -190,11 +210,16 @@
{
"description": "const with false does not match 0",
"database": {
"schemas": {
"const_4_0": {
"const": false
"types": [
{
"name": "const_4_0",
"schemas": {
"const_4_0": {
"const": false
}
}
}
}
]
},
"tests": [
{
@ -229,11 +254,16 @@
{
"description": "const with true does not match 1",
"database": {
"schemas": {
"const_5_0": {
"const": true
"types": [
{
"name": "const_5_0",
"schemas": {
"const_5_0": {
"const": true
}
}
}
}
]
},
"tests": [
{
@ -268,13 +298,18 @@
{
"description": "const with [false] does not match [0]",
"database": {
"schemas": {
"const_6_0": {
"const": [
false
]
"types": [
{
"name": "const_6_0",
"schemas": {
"const_6_0": {
"const": [
false
]
}
}
}
}
]
},
"tests": [
{
@ -315,13 +350,18 @@
{
"description": "const with [true] does not match [1]",
"database": {
"schemas": {
"const_7_0": {
"const": [
true
]
"types": [
{
"name": "const_7_0",
"schemas": {
"const_7_0": {
"const": [
true
]
}
}
}
}
]
},
"tests": [
{
@ -362,13 +402,18 @@
{
"description": "const with {\"a\": false} does not match {\"a\": 0}",
"database": {
"schemas": {
"const_8_0": {
"const": {
"a": false
"types": [
{
"name": "const_8_0",
"schemas": {
"const_8_0": {
"const": {
"a": false
}
}
}
}
}
]
},
"tests": [
{
@ -409,13 +454,18 @@
{
"description": "const with {\"a\": true} does not match {\"a\": 1}",
"database": {
"schemas": {
"const_9_0": {
"const": {
"a": true
"types": [
{
"name": "const_9_0",
"schemas": {
"const_9_0": {
"const": {
"a": true
}
}
}
}
}
]
},
"tests": [
{
@ -456,11 +506,16 @@
{
"description": "const with 0 does not match other zero-like types",
"database": {
"schemas": {
"const_10_0": {
"const": 0
"types": [
{
"name": "const_10_0",
"schemas": {
"const_10_0": {
"const": 0
}
}
}
}
]
},
"tests": [
{
@ -522,11 +577,16 @@
{
"description": "const with 1 does not match true",
"database": {
"schemas": {
"const_11_0": {
"const": 1
"types": [
{
"name": "const_11_0",
"schemas": {
"const_11_0": {
"const": 1
}
}
}
}
]
},
"tests": [
{
@ -561,11 +621,16 @@
{
"description": "const with -2.0 matches integer and float types",
"database": {
"schemas": {
"const_12_0": {
"const": -2
"types": [
{
"name": "const_12_0",
"schemas": {
"const_12_0": {
"const": -2
}
}
}
}
]
},
"tests": [
{
@ -618,11 +683,16 @@
{
"description": "float and integers are equal up to 64-bit representation limits",
"database": {
"schemas": {
"const_13_0": {
"const": 9007199254740992
"types": [
{
"name": "const_13_0",
"schemas": {
"const_13_0": {
"const": 9007199254740992
}
}
}
}
]
},
"tests": [
{
@ -666,11 +736,16 @@
{
"description": "nul characters in strings",
"database": {
"schemas": {
"const_14_0": {
"const": "hello\u0000there"
"types": [
{
"name": "const_14_0",
"schemas": {
"const_14_0": {
"const": "hello\u0000there"
}
}
}
}
]
},
"tests": [
{
@ -696,17 +771,22 @@
{
"description": "characters with the same visual representation but different codepoint",
"database": {
"schemas": {
"const_15_0": {
"const": "μ",
"$comment": "U+03BC"
"types": [
{
"name": "const_15_0",
"schemas": {
"const_15_0": {
"const": "\u03bc",
"$comment": "U+03BC"
}
}
}
}
]
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"data": "\u03bc",
"comment": "U+03BC",
"schema_id": "const_15_0",
"action": "validate",
@ -716,7 +796,7 @@
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"data": "\u00b5",
"comment": "U+00B5",
"schema_id": "const_15_0",
"action": "validate",
@ -729,17 +809,22 @@
{
"description": "characters with the same visual representation, but different number of codepoints",
"database": {
"schemas": {
"const_16_0": {
"const": "ä",
"$comment": "U+00E4"
"types": [
{
"name": "const_16_0",
"schemas": {
"const_16_0": {
"const": "\u00e4",
"$comment": "U+00E4"
}
}
}
}
]
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"data": "\u00e4",
"comment": "U+00E4",
"schema_id": "const_16_0",
"action": "validate",
@ -749,7 +834,7 @@
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"data": "a\u0308",
"comment": "a, U+0308",
"schema_id": "const_16_0",
"action": "validate",
@ -762,14 +847,19 @@
{
"description": "extensible: true allows extra properties in const object match",
"database": {
"schemas": {
"const_17_0": {
"const": {
"a": 1
},
"extensible": true
"types": [
{
"name": "const_17_0",
"schemas": {
"const_17_0": {
"const": {
"a": 1
},
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,14 +2,19 @@
{
"description": "contains keyword validation",
"database": {
"schemas": {
"contains_0_0": {
"contains": {
"minimum": 5
},
"items": true
"types": [
{
"name": "contains_0_0",
"schemas": {
"contains_0_0": {
"contains": {
"minimum": 5
},
"items": true
}
}
}
}
]
},
"tests": [
{
@ -88,14 +93,19 @@
{
"description": "contains keyword with const keyword",
"database": {
"schemas": {
"contains_1_0": {
"contains": {
"const": 5
},
"items": true
"types": [
{
"name": "contains_1_0",
"schemas": {
"contains_1_0": {
"contains": {
"const": 5
},
"items": true
}
}
}
}
]
},
"tests": [
{
@ -144,11 +154,16 @@
{
"description": "contains keyword with boolean schema true",
"database": {
"schemas": {
"contains_2_0": {
"contains": true
"types": [
{
"name": "contains_2_0",
"schemas": {
"contains_2_0": {
"contains": true
}
}
}
}
]
},
"tests": [
{
@ -176,11 +191,16 @@
{
"description": "contains keyword with boolean schema false",
"database": {
"schemas": {
"contains_3_0": {
"contains": false
"types": [
{
"name": "contains_3_0",
"schemas": {
"contains_3_0": {
"contains": false
}
}
}
}
]
},
"tests": [
{
@ -217,16 +237,21 @@
{
"description": "items + contains",
"database": {
"schemas": {
"contains_4_0": {
"items": {
"multipleOf": 2
},
"contains": {
"multipleOf": 3
"types": [
{
"name": "contains_4_0",
"schemas": {
"contains_4_0": {
"items": {
"multipleOf": 2
},
"contains": {
"multipleOf": 3
}
}
}
}
}
]
},
"tests": [
{
@ -284,14 +309,19 @@
{
"description": "contains with false if subschema",
"database": {
"schemas": {
"contains_5_0": {
"contains": {
"if": false,
"else": true
"types": [
{
"name": "contains_5_0",
"schemas": {
"contains_5_0": {
"contains": {
"if": false,
"else": true
}
}
}
}
}
]
},
"tests": [
{
@ -319,13 +349,18 @@
{
"description": "contains with null instance elements",
"database": {
"schemas": {
"contains_6_0": {
"contains": {
"type": "null"
"types": [
{
"name": "contains_6_0",
"schemas": {
"contains_6_0": {
"contains": {
"type": "null"
}
}
}
}
}
]
},
"tests": [
{
@ -344,14 +379,19 @@
{
"description": "extensible: true allows non-matching items in contains",
"database": {
"schemas": {
"contains_7_0": {
"contains": {
"const": 1
},
"extensible": true
"types": [
{
"name": "contains_7_0",
"schemas": {
"contains_7_0": {
"contains": {
"const": 1
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -371,13 +411,18 @@
{
"description": "strict by default: non-matching items in contains are invalid",
"database": {
"schemas": {
"contains_8_0": {
"contains": {
"const": 1
"types": [
{
"name": "contains_8_0",
"schemas": {
"contains_8_0": {
"contains": {
"const": 1
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "validation of string-encoded content based on media type",
"database": {
"schemas": {
"content_0_0": {
"contentMediaType": "application/json"
"types": [
{
"name": "content_0_0",
"schemas": {
"content_0_0": {
"contentMediaType": "application/json"
}
}
}
}
]
},
"tests": [
{
@ -41,11 +46,16 @@
{
"description": "validation of binary string-encoding",
"database": {
"schemas": {
"content_1_0": {
"contentEncoding": "base64"
"types": [
{
"name": "content_1_0",
"schemas": {
"content_1_0": {
"contentEncoding": "base64"
}
}
}
}
]
},
"tests": [
{
@ -80,12 +90,17 @@
{
"description": "validation of binary-encoded media type documents",
"database": {
"schemas": {
"content_2_0": {
"contentMediaType": "application/json",
"contentEncoding": "base64"
"types": [
{
"name": "content_2_0",
"schemas": {
"content_2_0": {
"contentMediaType": "application/json",
"contentEncoding": "base64"
}
}
}
}
]
},
"tests": [
{
@ -129,26 +144,31 @@
{
"description": "validation of binary-encoded media type documents with schema",
"database": {
"schemas": {
"content_3_0": {
"contentMediaType": "application/json",
"contentEncoding": "base64",
"contentSchema": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "string"
},
"boo": {
"type": "integer"
"types": [
{
"name": "content_3_0",
"schemas": {
"content_3_0": {
"contentMediaType": "application/json",
"contentEncoding": "base64",
"contentSchema": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "string"
},
"boo": {
"type": "integer"
}
}
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,17 +2,22 @@
{
"description": "single dependency (required)",
"database": {
"schemas": {
"schema1": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"bar": [
"foo"
]
},
"extensible": true
"types": [
{
"name": "schema1",
"schemas": {
"schema1": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"bar": [
"foo"
]
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -92,15 +97,20 @@
{
"description": "empty dependents",
"database": {
"schemas": {
"schema2": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"bar": []
},
"extensible": true
"types": [
{
"name": "schema2",
"schemas": {
"schema2": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"bar": []
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -137,18 +147,23 @@
{
"description": "multiple dependents required",
"database": {
"schemas": {
"schema3": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"quux": [
"foo",
"bar"
]
},
"extensible": true
"types": [
{
"name": "schema3",
"schemas": {
"schema3": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"quux": [
"foo",
"bar"
]
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -225,20 +240,25 @@
{
"description": "dependencies with escaped characters",
"database": {
"schemas": {
"schema4": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"foo\nbar": [
"foo\rbar"
],
"foo\"bar": [
"foo'bar"
]
},
"extensible": true
"types": [
{
"name": "schema4",
"schemas": {
"schema4": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"foo\nbar": [
"foo\rbar"
],
"foo\"bar": [
"foo'bar"
]
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -293,17 +313,22 @@
{
"description": "extensible: true allows extra properties in dependentRequired",
"database": {
"schemas": {
"schema5": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"bar": [
"foo"
]
},
"extensible": true
"types": [
{
"name": "schema5",
"schemas": {
"schema5": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"dependencies": {
"bar": [
"foo"
]
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -324,27 +349,32 @@
{
"description": "single dependency (schemas, STRICT)",
"database": {
"schemas": {
"schema_schema1": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": true,
"bar": true
},
"dependencies": {
"bar": {
"types": [
{
"name": "schema_schema1",
"schemas": {
"schema_schema1": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {
"type": "integer"
},
"foo": true,
"bar": true
},
"dependencies": {
"bar": {
"type": "integer"
"properties": {
"foo": {
"type": "integer"
},
"bar": {
"type": "integer"
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -445,28 +475,33 @@
{
"description": "single dependency (schemas, EXTENSIBLE)",
"database": {
"schemas": {
"schema_schema2": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": true,
"bar": true
},
"dependencies": {
"bar": {
"types": [
{
"name": "schema_schema2",
"schemas": {
"schema_schema2": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {
"type": "integer"
},
"foo": true,
"bar": true
},
"dependencies": {
"bar": {
"type": "integer"
"properties": {
"foo": {
"type": "integer"
},
"bar": {
"type": "integer"
}
}
}
}
},
"extensible": true
}
},
"extensible": true
}
}
}
]
},
"tests": [
{
@ -485,19 +520,24 @@
{
"description": "boolean subschemas",
"database": {
"schemas": {
"schema_schema3": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": true,
"bar": true
},
"dependencies": {
"foo": true,
"bar": false
"types": [
{
"name": "schema_schema3",
"schemas": {
"schema_schema3": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": true,
"bar": true
},
"dependencies": {
"foo": true,
"bar": false
}
}
}
}
}
]
},
"tests": [
{
@ -548,29 +588,34 @@
{
"description": "dependencies with escaped characters",
"database": {
"schemas": {
"schema_schema4": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo\tbar": true,
"foo'bar": true,
"a": true,
"b": true,
"c": true
},
"dependencies": {
"foo\tbar": {
"minProperties": 4,
"extensible": true
},
"foo'bar": {
"required": [
"foo\"bar"
]
"types": [
{
"name": "schema_schema4",
"schemas": {
"schema_schema4": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo\tbar": true,
"foo'bar": true,
"a": true,
"b": true,
"c": true
},
"dependencies": {
"foo\tbar": {
"minProperties": 4,
"extensible": true
},
"foo'bar": {
"required": [
"foo\"bar"
]
}
}
}
}
}
}
]
},
"tests": [
{
@ -628,22 +673,27 @@
{
"description": "dependent subschema incompatible with root (STRICT)",
"database": {
"schemas": {
"schema_schema5": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {},
"baz": true
},
"dependencies": {
"foo": {
"types": [
{
"name": "schema_schema5",
"schemas": {
"schema_schema5": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"bar": {}
"foo": {},
"baz": true
},
"dependencies": {
"foo": {
"properties": {
"bar": {}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -701,24 +751,29 @@
{
"description": "dependent subschema incompatible with root (EXTENSIBLE)",
"database": {
"schemas": {
"schema_schema6": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {},
"baz": true
},
"dependencies": {
"foo": {
"types": [
{
"name": "schema_schema6",
"schemas": {
"schema_schema6": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"bar": {}
"foo": {},
"baz": true
},
"additionalProperties": false
"dependencies": {
"foo": {
"properties": {
"bar": {}
},
"additionalProperties": false
}
},
"extensible": true
}
},
"extensible": true
}
}
}
]
},
"tests": [
{

View File

@ -2,43 +2,48 @@
{
"description": "empty string is valid for all types (except const)",
"database": {
"schemas": {
"emptyString_0_0": {
"properties": {
"obj": {
"type": "object"
},
"arr": {
"type": "array"
},
"str": {
"type": "string"
},
"int": {
"type": "integer"
},
"num": {
"type": "number"
},
"bool": {
"type": "boolean"
},
"nul": {
"type": "null"
},
"fmt": {
"type": "string",
"format": "uuid"
},
"con": {
"const": "value"
},
"con_empty": {
"const": ""
"types": [
{
"name": "emptyString_0_0",
"schemas": {
"emptyString_0_0": {
"properties": {
"obj": {
"type": "object"
},
"arr": {
"type": "array"
},
"str": {
"type": "string"
},
"int": {
"type": "integer"
},
"num": {
"type": "number"
},
"bool": {
"type": "boolean"
},
"nul": {
"type": "null"
},
"fmt": {
"type": "string",
"format": "uuid"
},
"con": {
"const": "value"
},
"con_empty": {
"const": ""
}
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,15 +2,20 @@
{
"description": "simple enum validation",
"database": {
"schemas": {
"enum_0_0": {
"enum": [
1,
2,
3
]
"types": [
{
"name": "enum_0_0",
"schemas": {
"enum_0_0": {
"enum": [
1,
2,
3
]
}
}
}
}
]
},
"tests": [
{
@ -36,22 +41,27 @@
{
"description": "heterogeneous enum validation",
"database": {
"schemas": {
"enum_1_0": {
"enum": [
6,
"foo",
[],
true,
{
"foo": 12
"types": [
{
"name": "enum_1_0",
"schemas": {
"enum_1_0": {
"enum": [
6,
"foo",
[],
true,
{
"foo": 12
}
],
"properties": {
"foo": {}
}
}
],
"properties": {
"foo": {}
}
}
}
]
},
"tests": [
{
@ -111,14 +121,19 @@
{
"description": "heterogeneous enum-with-null validation",
"database": {
"schemas": {
"enum_2_0": {
"enum": [
6,
null
]
"types": [
{
"name": "enum_2_0",
"schemas": {
"enum_2_0": {
"enum": [
6,
null
]
}
}
}
}
]
},
"tests": [
{
@ -153,26 +168,31 @@
{
"description": "enums in properties",
"database": {
"schemas": {
"enum_3_0": {
"type": "object",
"properties": {
"foo": {
"enum": [
"foo"
]
},
"bar": {
"enum": [
"types": [
{
"name": "enum_3_0",
"schemas": {
"enum_3_0": {
"type": "object",
"properties": {
"foo": {
"enum": [
"foo"
]
},
"bar": {
"enum": [
"bar"
]
}
},
"required": [
"bar"
]
}
},
"required": [
"bar"
]
}
}
}
]
},
"tests": [
{
@ -247,14 +267,19 @@
{
"description": "enum with escaped characters",
"database": {
"schemas": {
"enum_4_0": {
"enum": [
"foo\nbar",
"foo\rbar"
]
"types": [
{
"name": "enum_4_0",
"schemas": {
"enum_4_0": {
"enum": [
"foo\nbar",
"foo\rbar"
]
}
}
}
}
]
},
"tests": [
{
@ -289,13 +314,18 @@
{
"description": "enum with false does not match 0",
"database": {
"schemas": {
"enum_5_0": {
"enum": [
false
]
"types": [
{
"name": "enum_5_0",
"schemas": {
"enum_5_0": {
"enum": [
false
]
}
}
}
}
]
},
"tests": [
{
@ -330,15 +360,20 @@
{
"description": "enum with [false] does not match [0]",
"database": {
"schemas": {
"enum_6_0": {
"enum": [
[
false
]
]
"types": [
{
"name": "enum_6_0",
"schemas": {
"enum_6_0": {
"enum": [
[
false
]
]
}
}
}
}
]
},
"tests": [
{
@ -379,13 +414,18 @@
{
"description": "enum with true does not match 1",
"database": {
"schemas": {
"enum_7_0": {
"enum": [
true
]
"types": [
{
"name": "enum_7_0",
"schemas": {
"enum_7_0": {
"enum": [
true
]
}
}
}
}
]
},
"tests": [
{
@ -420,15 +460,20 @@
{
"description": "enum with [true] does not match [1]",
"database": {
"schemas": {
"enum_8_0": {
"enum": [
[
true
]
]
"types": [
{
"name": "enum_8_0",
"schemas": {
"enum_8_0": {
"enum": [
[
true
]
]
}
}
}
}
]
},
"tests": [
{
@ -469,13 +514,18 @@
{
"description": "enum with 0 does not match false",
"database": {
"schemas": {
"enum_9_0": {
"enum": [
0
]
"types": [
{
"name": "enum_9_0",
"schemas": {
"enum_9_0": {
"enum": [
0
]
}
}
}
}
]
},
"tests": [
{
@ -510,15 +560,20 @@
{
"description": "enum with [0] does not match [false]",
"database": {
"schemas": {
"enum_10_0": {
"enum": [
[
0
]
]
"types": [
{
"name": "enum_10_0",
"schemas": {
"enum_10_0": {
"enum": [
[
0
]
]
}
}
}
}
]
},
"tests": [
{
@ -559,13 +614,18 @@
{
"description": "enum with 1 does not match true",
"database": {
"schemas": {
"enum_11_0": {
"enum": [
1
]
"types": [
{
"name": "enum_11_0",
"schemas": {
"enum_11_0": {
"enum": [
1
]
}
}
}
}
]
},
"tests": [
{
@ -600,15 +660,20 @@
{
"description": "enum with [1] does not match [true]",
"database": {
"schemas": {
"enum_12_0": {
"enum": [
[
1
]
]
"types": [
{
"name": "enum_12_0",
"schemas": {
"enum_12_0": {
"enum": [
[
1
]
]
}
}
}
}
]
},
"tests": [
{
@ -649,13 +714,18 @@
{
"description": "nul characters in strings",
"database": {
"schemas": {
"enum_13_0": {
"enum": [
"hello\u0000there"
]
"types": [
{
"name": "enum_13_0",
"schemas": {
"enum_13_0": {
"enum": [
"hello\u0000there"
]
}
}
}
}
]
},
"tests": [
{
@ -681,16 +751,21 @@
{
"description": "extensible: true allows extra properties in enum object match",
"database": {
"schemas": {
"enum_14_0": {
"enum": [
{
"foo": 1
"types": [
{
"name": "enum_14_0",
"schemas": {
"enum_14_0": {
"enum": [
{
"foo": 1
}
],
"extensible": true
}
],
"extensible": true
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "exclusiveMaximum validation",
"database": {
"schemas": {
"exclusiveMaximum_0_0": {
"exclusiveMaximum": 3
"types": [
{
"name": "exclusiveMaximum_0_0",
"schemas": {
"exclusiveMaximum_0_0": {
"exclusiveMaximum": 3
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "exclusiveMinimum validation",
"database": {
"schemas": {
"exclusiveMinimum_0_0": {
"exclusiveMinimum": 1.1
"types": [
{
"name": "exclusiveMinimum_0_0",
"schemas": {
"exclusiveMinimum_0_0": {
"exclusiveMinimum": 1.1
}
}
}
}
]
},
"tests": [
{

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,18 @@
{
"description": "a schema given for items",
"database": {
"schemas": {
"items_0_0": {
"items": {
"type": "integer"
"types": [
{
"name": "items_0_0",
"schemas": {
"items_0_0": {
"items": {
"type": "integer"
}
}
}
}
}
]
},
"tests": [
{
@ -64,11 +69,16 @@
{
"description": "items with boolean schema (true)",
"database": {
"schemas": {
"items_1_0": {
"items": true
"types": [
{
"name": "items_1_0",
"schemas": {
"items_1_0": {
"items": true
}
}
}
}
]
},
"tests": [
{
@ -98,11 +108,16 @@
{
"description": "items with boolean schema (false)",
"database": {
"schemas": {
"items_2_0": {
"items": false
"types": [
{
"name": "items_2_0",
"schemas": {
"items_2_0": {
"items": false
}
}
}
}
]
},
"tests": [
{
@ -132,41 +147,56 @@
{
"description": "items and subitems",
"database": {
"schemas": {
"items_3_0": {
"type": "array",
"items": false,
"prefixItems": [
{
"type": "item"
},
{
"type": "item"
},
{
"type": "item"
"types": [
{
"name": "items_3_0",
"schemas": {
"items_3_0": {
"type": "array",
"items": false,
"prefixItems": [
{
"type": "item"
},
{
"type": "item"
},
{
"type": "item"
}
]
}
]
}
},
"item": {
"type": "array",
"items": false,
"prefixItems": [
{
"type": "sub-item"
},
{
"type": "sub-item"
{
"name": "item",
"schemas": {
"item": {
"type": "array",
"items": false,
"prefixItems": [
{
"type": "sub-item"
},
{
"type": "sub-item"
}
]
}
]
}
},
"sub-item": {
"type": "object",
"required": [
"foo"
]
{
"name": "sub-item",
"schemas": {
"sub-item": {
"type": "object",
"required": [
"foo"
]
}
}
}
}
]
},
"tests": [
{
@ -368,23 +398,28 @@
{
"description": "nested items",
"database": {
"schemas": {
"items_4_0": {
"type": "array",
"items": {
"type": "array",
"items": {
"types": [
{
"name": "items_4_0",
"schemas": {
"items_4_0": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -500,16 +535,21 @@
{
"description": "prefixItems with no additional items allowed",
"database": {
"schemas": {
"items_5_0": {
"prefixItems": [
{},
{},
{}
],
"items": false
"types": [
{
"name": "items_5_0",
"schemas": {
"items_5_0": {
"prefixItems": [
{},
{},
{}
],
"items": false
}
}
}
}
]
},
"tests": [
{
@ -576,22 +616,27 @@
{
"description": "items does not look in applicators, valid case",
"database": {
"schemas": {
"items_6_0": {
"allOf": [
{
"prefixItems": [
"types": [
{
"name": "items_6_0",
"schemas": {
"items_6_0": {
"allOf": [
{
"minimum": 3
"prefixItems": [
{
"minimum": 3
}
]
}
]
],
"items": {
"minimum": 5
}
}
],
"items": {
"minimum": 5
}
}
}
]
},
"tests": [
{
@ -623,18 +668,23 @@
{
"description": "prefixItems validation adjusts the starting index for items",
"database": {
"schemas": {
"items_7_0": {
"prefixItems": [
{
"type": "string"
"types": [
{
"name": "items_7_0",
"schemas": {
"items_7_0": {
"prefixItems": [
{
"type": "string"
}
],
"items": {
"type": "integer"
}
}
],
"items": {
"type": "integer"
}
}
}
]
},
"tests": [
{
@ -667,14 +717,19 @@
{
"description": "items with heterogeneous array",
"database": {
"schemas": {
"items_8_0": {
"prefixItems": [
{}
],
"items": false
"types": [
{
"name": "items_8_0",
"schemas": {
"items_8_0": {
"prefixItems": [
{}
],
"items": false
}
}
}
}
]
},
"tests": [
{
@ -706,13 +761,18 @@
{
"description": "items with null instance elements",
"database": {
"schemas": {
"items_9_0": {
"items": {
"type": "null"
"types": [
{
"name": "items_9_0",
"schemas": {
"items_9_0": {
"items": {
"type": "null"
}
}
}
}
}
]
},
"tests": [
{
@ -731,12 +791,17 @@
{
"description": "extensible: true allows extra items (when items is false)",
"database": {
"schemas": {
"items_10_0": {
"items": false,
"extensible": true
"types": [
{
"name": "items_10_0",
"schemas": {
"items_10_0": {
"items": false,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -755,14 +820,19 @@
{
"description": "extensible: true allows extra properties for items",
"database": {
"schemas": {
"items_11_0": {
"items": {
"minimum": 5
},
"extensible": true
"types": [
{
"name": "items_11_0",
"schemas": {
"items_11_0": {
"items": {
"minimum": 5
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -793,12 +863,17 @@
{
"description": "array: simple extensible array",
"database": {
"schemas": {
"items_12_0": {
"type": "array",
"extensible": true
"types": [
{
"name": "items_12_0",
"schemas": {
"items_12_0": {
"type": "array",
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -827,12 +902,17 @@
{
"description": "array: strict array",
"database": {
"schemas": {
"items_13_0": {
"type": "array",
"extensible": false
"types": [
{
"name": "items_13_0",
"schemas": {
"items_13_0": {
"type": "array",
"extensible": false
}
}
}
}
]
},
"tests": [
{
@ -860,14 +940,19 @@
{
"description": "array: items extensible",
"database": {
"schemas": {
"items_14_0": {
"type": "array",
"items": {
"extensible": true
"types": [
{
"name": "items_14_0",
"schemas": {
"items_14_0": {
"type": "array",
"items": {
"extensible": true
}
}
}
}
}
]
},
"tests": [
{
@ -897,15 +982,20 @@
{
"description": "array: items strict",
"database": {
"schemas": {
"items_15_0": {
"type": "array",
"items": {
"type": "object",
"extensible": false
"types": [
{
"name": "items_15_0",
"schemas": {
"items_15_0": {
"type": "array",
"items": {
"type": "object",
"extensible": false
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "maxContains without contains is ignored",
"database": {
"schemas": {
"maxContains_0_0": {
"maxContains": 1,
"extensible": true
"types": [
{
"name": "maxContains_0_0",
"schemas": {
"maxContains_0_0": {
"maxContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -38,15 +43,20 @@
{
"description": "maxContains with contains",
"database": {
"schemas": {
"maxContains_1_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"extensible": true
"types": [
{
"name": "maxContains_1_0",
"schemas": {
"maxContains_1_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -111,15 +121,20 @@
{
"description": "maxContains with contains, value with a decimal",
"database": {
"schemas": {
"maxContains_2_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"extensible": true
"types": [
{
"name": "maxContains_2_0",
"schemas": {
"maxContains_2_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -150,16 +165,21 @@
{
"description": "minContains < maxContains",
"database": {
"schemas": {
"maxContains_3_0": {
"contains": {
"const": 1
},
"minContains": 1,
"maxContains": 3,
"extensible": true
"types": [
{
"name": "maxContains_3_0",
"schemas": {
"maxContains_3_0": {
"contains": {
"const": 1
},
"minContains": 1,
"maxContains": 3,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -202,15 +222,20 @@
{
"description": "extensible: true allows non-matching items in maxContains",
"database": {
"schemas": {
"maxContains_4_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"extensible": true
"types": [
{
"name": "maxContains_4_0",
"schemas": {
"maxContains_4_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "maxItems validation",
"database": {
"schemas": {
"maxItems_0_0": {
"maxItems": 2,
"extensible": true
"types": [
{
"name": "maxItems_0_0",
"schemas": {
"maxItems_0_0": {
"maxItems": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -60,12 +65,17 @@
{
"description": "maxItems validation with a decimal",
"database": {
"schemas": {
"maxItems_1_0": {
"maxItems": 2,
"extensible": true
"types": [
{
"name": "maxItems_1_0",
"schemas": {
"maxItems_1_0": {
"maxItems": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -97,12 +107,17 @@
{
"description": "extensible: true allows extra items in maxItems (but counted)",
"database": {
"schemas": {
"maxItems_2_0": {
"maxItems": 2,
"extensible": true
"types": [
{
"name": "maxItems_2_0",
"schemas": {
"maxItems_2_0": {
"maxItems": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "maxLength validation",
"database": {
"schemas": {
"maxLength_0_0": {
"maxLength": 2
"types": [
{
"name": "maxLength_0_0",
"schemas": {
"maxLength_0_0": {
"maxLength": 2
}
}
}
}
]
},
"tests": [
{
@ -47,7 +52,7 @@
},
{
"description": "two graphemes is long enough",
"data": "💩💩",
"data": "\ud83d\udca9\ud83d\udca9",
"schema_id": "maxLength_0_0",
"action": "validate",
"expect": {
@ -59,11 +64,16 @@
{
"description": "maxLength validation with a decimal",
"database": {
"schemas": {
"maxLength_1_0": {
"maxLength": 2
"types": [
{
"name": "maxLength_1_0",
"schemas": {
"maxLength_1_0": {
"maxLength": 2
}
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "maxProperties validation",
"database": {
"schemas": {
"maxProperties_0_0": {
"maxProperties": 2,
"extensible": true
"types": [
{
"name": "maxProperties_0_0",
"schemas": {
"maxProperties_0_0": {
"maxProperties": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -82,12 +87,17 @@
{
"description": "maxProperties validation with a decimal",
"database": {
"schemas": {
"maxProperties_1_0": {
"maxProperties": 2,
"extensible": true
"types": [
{
"name": "maxProperties_1_0",
"schemas": {
"maxProperties_1_0": {
"maxProperties": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -119,12 +129,17 @@
{
"description": "maxProperties = 0 means the object is empty",
"database": {
"schemas": {
"maxProperties_2_0": {
"maxProperties": 0,
"extensible": true
"types": [
{
"name": "maxProperties_2_0",
"schemas": {
"maxProperties_2_0": {
"maxProperties": 0,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -152,12 +167,17 @@
{
"description": "extensible: true allows extra properties in maxProperties (though maxProperties still counts them!)",
"database": {
"schemas": {
"maxProperties_3_0": {
"maxProperties": 2,
"extensible": true
"types": [
{
"name": "maxProperties_3_0",
"schemas": {
"maxProperties_3_0": {
"maxProperties": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "maximum validation",
"database": {
"schemas": {
"maximum_0_0": {
"maximum": 3
"types": [
{
"name": "maximum_0_0",
"schemas": {
"maximum_0_0": {
"maximum": 3
}
}
}
}
]
},
"tests": [
{
@ -50,11 +55,16 @@
{
"description": "maximum validation with unsigned integer",
"database": {
"schemas": {
"maximum_1_0": {
"maximum": 300
"types": [
{
"name": "maximum_1_0",
"schemas": {
"maximum_1_0": {
"maximum": 300
}
}
}
}
]
},
"tests": [
{

View File

@ -2,23 +2,33 @@
{
"description": "merging: properties accumulate",
"database": {
"schemas": {
"base_0": {
"properties": {
"base_prop": {
"type": "string"
"types": [
{
"name": "base_0",
"schemas": {
"base_0": {
"properties": {
"base_prop": {
"type": "string"
}
}
}
}
},
"merge_0_0": {
"type": "base_0",
"properties": {
"child_prop": {
"type": "string"
{
"name": "merge_0_0",
"schemas": {
"merge_0_0": {
"type": "base_0",
"properties": {
"child_prop": {
"type": "string"
}
}
}
}
}
}
]
},
"tests": [
{
@ -58,29 +68,39 @@
{
"description": "merging: required fields accumulate",
"database": {
"schemas": {
"base_1": {
"properties": {
"a": {
"type": "string"
"types": [
{
"name": "base_1",
"schemas": {
"base_1": {
"properties": {
"a": {
"type": "string"
}
},
"required": [
"a"
]
}
},
"required": [
"a"
]
}
},
"merge_1_0": {
"type": "base_1",
"properties": {
"b": {
"type": "string"
{
"name": "merge_1_0",
"schemas": {
"merge_1_0": {
"type": "base_1",
"properties": {
"b": {
"type": "string"
}
},
"required": [
"b"
]
}
},
"required": [
"b"
]
}
}
}
]
},
"tests": [
{
@ -138,36 +158,46 @@
{
"description": "merging: dependencies accumulate",
"database": {
"schemas": {
"base_2": {
"properties": {
"trigger": {
"type": "string"
},
"base_dep": {
"type": "string"
"types": [
{
"name": "base_2",
"schemas": {
"base_2": {
"properties": {
"trigger": {
"type": "string"
},
"base_dep": {
"type": "string"
}
},
"dependencies": {
"trigger": [
"base_dep"
]
}
}
},
"dependencies": {
"trigger": [
"base_dep"
]
}
},
"merge_2_0": {
"type": "base_2",
"properties": {
"child_dep": {
"type": "string"
{
"name": "merge_2_0",
"schemas": {
"merge_2_0": {
"type": "base_2",
"properties": {
"child_dep": {
"type": "string"
}
},
"dependencies": {
"trigger": [
"child_dep"
]
}
}
},
"dependencies": {
"trigger": [
"child_dep"
]
}
}
}
]
},
"tests": [
{
@ -228,33 +258,43 @@
{
"description": "merging: form and display do NOT merge",
"database": {
"schemas": {
"base_3": {
"properties": {
"a": {
"type": "string"
},
"b": {
"type": "string"
"types": [
{
"name": "base_3",
"schemas": {
"base_3": {
"properties": {
"a": {
"type": "string"
},
"b": {
"type": "string"
}
},
"form": [
"a",
"b"
]
}
},
"form": [
"a",
"b"
]
}
},
"merge_3_0": {
"type": "base_3",
"properties": {
"c": {
"type": "string"
{
"name": "merge_3_0",
"schemas": {
"merge_3_0": {
"type": "base_3",
"properties": {
"c": {
"type": "string"
}
},
"form": [
"c"
]
}
},
"form": [
"c"
]
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "minContains without contains is ignored",
"database": {
"schemas": {
"minContains_0_0": {
"minContains": 1,
"extensible": true
"types": [
{
"name": "minContains_0_0",
"schemas": {
"minContains_0_0": {
"minContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -35,15 +40,20 @@
{
"description": "minContains=1 with contains",
"database": {
"schemas": {
"minContains_1_0": {
"contains": {
"const": 1
},
"minContains": 1,
"extensible": true
"types": [
{
"name": "minContains_1_0",
"schemas": {
"minContains_1_0": {
"contains": {
"const": 1
},
"minContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -106,15 +116,20 @@
{
"description": "minContains=2 with contains",
"database": {
"schemas": {
"minContains_2_0": {
"contains": {
"const": 1
},
"minContains": 2,
"extensible": true
"types": [
{
"name": "minContains_2_0",
"schemas": {
"minContains_2_0": {
"contains": {
"const": 1
},
"minContains": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -192,15 +207,20 @@
{
"description": "minContains=2 with contains with a decimal value",
"database": {
"schemas": {
"minContains_3_0": {
"contains": {
"const": 1
},
"minContains": 2,
"extensible": true
"types": [
{
"name": "minContains_3_0",
"schemas": {
"minContains_3_0": {
"contains": {
"const": 1
},
"minContains": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -231,16 +251,21 @@
{
"description": "maxContains = minContains",
"database": {
"schemas": {
"minContains_4_0": {
"contains": {
"const": 1
},
"maxContains": 2,
"minContains": 2,
"extensible": true
"types": [
{
"name": "minContains_4_0",
"schemas": {
"minContains_4_0": {
"contains": {
"const": 1
},
"maxContains": 2,
"minContains": 2,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -293,16 +318,21 @@
{
"description": "maxContains < minContains",
"database": {
"schemas": {
"minContains_5_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"minContains": 3,
"extensible": true
"types": [
{
"name": "minContains_5_0",
"schemas": {
"minContains_5_0": {
"contains": {
"const": 1
},
"maxContains": 1,
"minContains": 3,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -355,15 +385,20 @@
{
"description": "minContains = 0",
"database": {
"schemas": {
"minContains_6_0": {
"contains": {
"const": 1
},
"minContains": 0,
"extensible": true
"types": [
{
"name": "minContains_6_0",
"schemas": {
"minContains_6_0": {
"contains": {
"const": 1
},
"minContains": 0,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -391,16 +426,21 @@
{
"description": "minContains = 0 with maxContains",
"database": {
"schemas": {
"minContains_7_0": {
"contains": {
"const": 1
},
"minContains": 0,
"maxContains": 1,
"extensible": true
"types": [
{
"name": "minContains_7_0",
"schemas": {
"minContains_7_0": {
"contains": {
"const": 1
},
"minContains": 0,
"maxContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -440,15 +480,20 @@
{
"description": "extensible: true allows non-matching items in minContains",
"database": {
"schemas": {
"minContains_8_0": {
"contains": {
"const": 1
},
"minContains": 1,
"extensible": true
"types": [
{
"name": "minContains_8_0",
"schemas": {
"minContains_8_0": {
"contains": {
"const": 1
},
"minContains": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "minItems validation",
"database": {
"schemas": {
"minItems_0_0": {
"minItems": 1,
"extensible": true
"types": [
{
"name": "minItems_0_0",
"schemas": {
"minItems_0_0": {
"minItems": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -56,12 +61,17 @@
{
"description": "minItems validation with a decimal",
"database": {
"schemas": {
"minItems_1_0": {
"minItems": 1,
"extensible": true
"types": [
{
"name": "minItems_1_0",
"schemas": {
"minItems_1_0": {
"minItems": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -90,12 +100,17 @@
{
"description": "extensible: true allows extra items in minItems",
"database": {
"schemas": {
"minItems_2_0": {
"minItems": 1,
"extensible": true
"types": [
{
"name": "minItems_2_0",
"schemas": {
"minItems_2_0": {
"minItems": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "minLength validation",
"database": {
"schemas": {
"minLength_0_0": {
"minLength": 2
"types": [
{
"name": "minLength_0_0",
"schemas": {
"minLength_0_0": {
"minLength": 2
}
}
}
}
]
},
"tests": [
{
@ -47,7 +52,7 @@
},
{
"description": "one grapheme is not long enough",
"data": "💩",
"data": "\ud83d\udca9",
"schema_id": "minLength_0_0",
"action": "validate",
"expect": {
@ -59,11 +64,16 @@
{
"description": "minLength validation with a decimal",
"database": {
"schemas": {
"minLength_1_0": {
"minLength": 2
"types": [
{
"name": "minLength_1_0",
"schemas": {
"minLength_1_0": {
"minLength": 2
}
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "minProperties validation",
"database": {
"schemas": {
"minProperties_0_0": {
"minProperties": 1,
"extensible": true
"types": [
{
"name": "minProperties_0_0",
"schemas": {
"minProperties_0_0": {
"minProperties": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -74,12 +79,17 @@
{
"description": "minProperties validation with a decimal",
"database": {
"schemas": {
"minProperties_1_0": {
"minProperties": 1,
"extensible": true
"types": [
{
"name": "minProperties_1_0",
"schemas": {
"minProperties_1_0": {
"minProperties": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -108,12 +118,17 @@
{
"description": "extensible: true allows extra properties in minProperties",
"database": {
"schemas": {
"minProperties_2_0": {
"minProperties": 1,
"extensible": true
"types": [
{
"name": "minProperties_2_0",
"schemas": {
"minProperties_2_0": {
"minProperties": 1,
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "minimum validation",
"database": {
"schemas": {
"minimum_0_0": {
"minimum": 1.1
"types": [
{
"name": "minimum_0_0",
"schemas": {
"minimum_0_0": {
"minimum": 1.1
}
}
}
}
]
},
"tests": [
{
@ -50,11 +55,16 @@
{
"description": "minimum validation with signed integer",
"database": {
"schemas": {
"minimum_1_0": {
"minimum": -2
"types": [
{
"name": "minimum_1_0",
"schemas": {
"minimum_1_0": {
"minimum": -2
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "by int",
"database": {
"schemas": {
"multipleOf_0_0": {
"multipleOf": 2
"types": [
{
"name": "multipleOf_0_0",
"schemas": {
"multipleOf_0_0": {
"multipleOf": 2
}
}
}
}
]
},
"tests": [
{
@ -41,11 +46,16 @@
{
"description": "by number",
"database": {
"schemas": {
"multipleOf_1_0": {
"multipleOf": 1.5
"types": [
{
"name": "multipleOf_1_0",
"schemas": {
"multipleOf_1_0": {
"multipleOf": 1.5
}
}
}
}
]
},
"tests": [
{
@ -80,11 +90,16 @@
{
"description": "by small number",
"database": {
"schemas": {
"multipleOf_2_0": {
"multipleOf": 0.0001
"types": [
{
"name": "multipleOf_2_0",
"schemas": {
"multipleOf_2_0": {
"multipleOf": 0.0001
}
}
}
}
]
},
"tests": [
{
@ -110,12 +125,17 @@
{
"description": "small multiple of large integer",
"database": {
"schemas": {
"multipleOf_3_0": {
"type": "integer",
"multipleOf": 1e-08
"types": [
{
"name": "multipleOf_3_0",
"schemas": {
"multipleOf_3_0": {
"type": "integer",
"multipleOf": 1e-08
}
}
}
}
]
},
"tests": [
{

View File

@ -2,13 +2,18 @@
{
"description": "not",
"database": {
"schemas": {
"not_0_0": {
"not": {
"type": "integer"
"types": [
{
"name": "not_0_0",
"schemas": {
"not_0_0": {
"not": {
"type": "integer"
}
}
}
}
}
]
},
"tests": [
{
@ -34,16 +39,21 @@
{
"description": "not multiple types",
"database": {
"schemas": {
"not_1_0": {
"not": {
"type": [
"integer",
"boolean"
]
"types": [
{
"name": "not_1_0",
"schemas": {
"not_1_0": {
"not": {
"type": [
"integer",
"boolean"
]
}
}
}
}
}
]
},
"tests": [
{
@ -78,19 +88,24 @@
{
"description": "not more complex schema",
"database": {
"schemas": {
"not_2_0": {
"not": {
"type": "object",
"properties": {
"foo": {
"type": "string"
}
"types": [
{
"name": "not_2_0",
"schemas": {
"not_2_0": {
"not": {
"type": "object",
"properties": {
"foo": {
"type": "string"
}
}
},
"extensible": true
}
},
"extensible": true
}
}
}
]
},
"tests": [
{
@ -129,15 +144,20 @@
{
"description": "forbidden property",
"database": {
"schemas": {
"not_3_0": {
"properties": {
"foo": {
"not": {}
"types": [
{
"name": "not_3_0",
"schemas": {
"not_3_0": {
"properties": {
"foo": {
"not": {}
}
}
}
}
}
}
]
},
"tests": [
{
@ -166,11 +186,16 @@
{
"description": "forbid everything with empty schema",
"database": {
"schemas": {
"not_4_0": {
"not": {}
"types": [
{
"name": "not_4_0",
"schemas": {
"not_4_0": {
"not": {}
}
}
}
}
]
},
"tests": [
{
@ -263,11 +288,16 @@
{
"description": "forbid everything with boolean schema true",
"database": {
"schemas": {
"not_5_0": {
"not": true
"types": [
{
"name": "not_5_0",
"schemas": {
"not_5_0": {
"not": true
}
}
}
}
]
},
"tests": [
{
@ -360,12 +390,17 @@
{
"description": "allow everything with boolean schema false",
"database": {
"schemas": {
"not_6_0": {
"not": false,
"extensible": true
"types": [
{
"name": "not_6_0",
"schemas": {
"not_6_0": {
"not": false,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -458,13 +493,18 @@
{
"description": "double negation",
"database": {
"schemas": {
"not_7_0": {
"not": {
"not": {}
"types": [
{
"name": "not_7_0",
"schemas": {
"not_7_0": {
"not": {
"not": {}
}
}
}
}
}
]
},
"tests": [
{
@ -481,14 +521,19 @@
{
"description": "extensible: true allows extra properties in not",
"database": {
"schemas": {
"not_8_0": {
"not": {
"type": "integer"
},
"extensible": true
"types": [
{
"name": "not_8_0",
"schemas": {
"not_8_0": {
"not": {
"type": "integer"
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -507,13 +552,18 @@
{
"description": "extensible: false (default) forbids extra properties in not",
"database": {
"schemas": {
"not_9_0": {
"not": {
"type": "integer"
"types": [
{
"name": "not_9_0",
"schemas": {
"not_9_0": {
"not": {
"type": "integer"
}
}
}
}
}
]
},
"tests": [
{
@ -532,19 +582,24 @@
{
"description": "property next to not (extensible: true)",
"database": {
"schemas": {
"not_10_0": {
"properties": {
"bar": {
"type": "string"
"types": [
{
"name": "not_10_0",
"schemas": {
"not_10_0": {
"properties": {
"bar": {
"type": "string"
}
},
"not": {
"type": "integer"
},
"extensible": true
}
},
"not": {
"type": "integer"
},
"extensible": true
}
}
}
]
},
"tests": [
{
@ -564,18 +619,23 @@
{
"description": "property next to not (extensible: false)",
"database": {
"schemas": {
"not_11_0": {
"properties": {
"bar": {
"type": "string"
"types": [
{
"name": "not_11_0",
"schemas": {
"not_11_0": {
"properties": {
"bar": {
"type": "string"
}
},
"not": {
"type": "integer"
}
}
},
"not": {
"type": "integer"
}
}
}
]
},
"tests": [
{

View File

@ -2,27 +2,37 @@
{
"description": "Strict Inheritance",
"database": {
"schemas": {
"parent_type": {
"type": "object",
"properties": {
"a": {
"type": "integer"
"types": [
{
"name": "parent_type",
"schemas": {
"parent_type": {
"type": "object",
"properties": {
"a": {
"type": "integer"
}
},
"required": [
"a"
]
}
},
"required": [
"a"
]
}
},
"child_type": {
"type": "parent_type",
"properties": {
"b": {
"type": "integer"
{
"name": "child_type",
"schemas": {
"child_type": {
"type": "parent_type",
"properties": {
"b": {
"type": "integer"
}
}
}
}
}
}
]
},
"tests": [
{
@ -66,26 +76,36 @@
{
"description": "Local Shadowing (Composition & Proxies)",
"database": {
"schemas": {
"budget": {
"type": "object",
"properties": {
"max": {
"type": "integer",
"maximum": 100
"types": [
{
"name": "budget",
"schemas": {
"budget": {
"type": "object",
"properties": {
"max": {
"type": "integer",
"maximum": 100
}
}
}
}
},
"custom_budget": {
"type": "budget",
"properties": {
"max": {
"type": "integer",
"maximum": 50
{
"name": "custom_budget",
"schemas": {
"custom_budget": {
"type": "budget",
"properties": {
"max": {
"type": "integer",
"maximum": 50
}
}
}
}
}
}
]
},
"tests": [
{
@ -115,30 +135,40 @@
{
"description": "Primitive Array Shorthand (Optionality)",
"database": {
"schemas": {
"invoice": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
}
},
"required": [
"amount"
]
},
"request": {
"type": "object",
"properties": {
"inv": {
"type": [
"invoice",
"null"
"types": [
{
"name": "invoice",
"schemas": {
"invoice": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
}
},
"required": [
"amount"
]
}
}
},
{
"name": "request",
"schemas": {
"request": {
"type": "object",
"properties": {
"inv": {
"type": [
"invoice",
"null"
]
}
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,63 +2,68 @@
{
"description": "Hybrid Array Pathing",
"database": {
"schemas": {
"hybrid_pathing": {
"type": "object",
"properties": {
"primitives": {
"type": "array",
"items": {
"type": "string"
}
},
"ad_hoc_objects": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"types": [
{
"name": "hybrid_pathing",
"schemas": {
"hybrid_pathing": {
"type": "object",
"properties": {
"primitives": {
"type": "array",
"items": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"type": "number",
"minimum": 10
"ad_hoc_objects": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
}
}
},
"deep_entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nested": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"flag": {
"type": "boolean"
},
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"type": "number",
"minimum": 10
}
}
}
},
"deep_entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nested": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"flag": {
"type": "boolean"
}
}
}
}
}
@ -68,7 +73,7 @@
}
}
}
}
]
},
"tests": [
{
@ -227,26 +232,31 @@
{
"description": "Ad-Hoc Union Pathing",
"database": {
"schemas": {
"ad_hoc_pathing": {
"type": "object",
"properties": {
"metadata_bubbles": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
"types": [
{
"name": "ad_hoc_pathing",
"schemas": {
"ad_hoc_pathing": {
"type": "object",
"properties": {
"metadata_bubbles": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
]
}
}
}
}
}
}
]
},
"tests": [
{
@ -277,9 +287,22 @@
{
"description": "Polymorphic Family Pathing",
"database": {
"relations": [
{
"id": "11111111-1111-1111-1111-111111111111",
"type": "relation",
"constraint": "fk_family_pathing_table_families_widget",
"source_type": "widget",
"source_columns": ["family_pathing_id"],
"destination_type": "family_pathing",
"destination_columns": ["id"],
"prefix": "table_families"
}
],
"types": [
{
"name": "widget",
"hierarchy": ["widget"],
"variations": [
"widget"
],
@ -322,21 +345,25 @@
]
}
}
}
],
"schemas": {
"family_pathing": {
"type": "object",
"properties": {
"table_families": {
"type": "array",
"items": {
"family": "widget"
},
{
"name": "family_pathing",
"hierarchy": ["family_pathing"],
"schemas": {
"family_pathing": {
"type": "object",
"properties": {
"table_families": {
"type": "array",
"items": {
"family": "widget"
}
}
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "pattern validation",
"database": {
"schemas": {
"pattern_0_0": {
"pattern": "^a*$"
"types": [
{
"name": "pattern_0_0",
"schemas": {
"pattern_0_0": {
"pattern": "^a*$"
}
}
}
}
]
},
"tests": [
{
@ -86,11 +91,16 @@
{
"description": "pattern is not anchored",
"database": {
"schemas": {
"pattern_1_0": {
"pattern": "a+"
"types": [
{
"name": "pattern_1_0",
"schemas": {
"pattern_1_0": {
"pattern": "a+"
}
}
}
}
]
},
"tests": [
{

View File

@ -2,16 +2,21 @@
{
"description": "patternProperties validates properties matching a regex",
"database": {
"schemas": {
"patternProperties_0_0": {
"patternProperties": {
"f.*o": {
"type": "integer"
"types": [
{
"name": "patternProperties_0_0",
"schemas": {
"patternProperties_0_0": {
"patternProperties": {
"f.*o": {
"type": "integer"
}
},
"items": {}
}
},
"items": {}
}
}
}
]
},
"tests": [
{
@ -107,18 +112,23 @@
{
"description": "multiple simultaneous patternProperties are validated",
"database": {
"schemas": {
"patternProperties_1_0": {
"patternProperties": {
"a*": {
"type": "integer"
},
"aaa*": {
"maximum": 20
"types": [
{
"name": "patternProperties_1_0",
"schemas": {
"patternProperties_1_0": {
"patternProperties": {
"a*": {
"type": "integer"
},
"aaa*": {
"maximum": 20
}
}
}
}
}
}
]
},
"tests": [
{
@ -194,19 +204,24 @@
{
"description": "regexes are not anchored by default and are case sensitive",
"database": {
"schemas": {
"patternProperties_2_0": {
"patternProperties": {
"[0-9]{2,}": {
"type": "boolean"
},
"X_": {
"type": "string"
"types": [
{
"name": "patternProperties_2_0",
"schemas": {
"patternProperties_2_0": {
"patternProperties": {
"[0-9]{2,}": {
"type": "boolean"
},
"X_": {
"type": "string"
}
},
"extensible": true
}
},
"extensible": true
}
}
}
]
},
"tests": [
{
@ -258,14 +273,19 @@
{
"description": "patternProperties with boolean schemas",
"database": {
"schemas": {
"patternProperties_3_0": {
"patternProperties": {
"f.*": true,
"b.*": false
"types": [
{
"name": "patternProperties_3_0",
"schemas": {
"patternProperties_3_0": {
"patternProperties": {
"f.*": true,
"b.*": false
}
}
}
}
}
]
},
"tests": [
{
@ -327,15 +347,20 @@
{
"description": "patternProperties with null valued instance properties",
"database": {
"schemas": {
"patternProperties_4_0": {
"patternProperties": {
"^.*bar$": {
"type": "null"
"types": [
{
"name": "patternProperties_4_0",
"schemas": {
"patternProperties_4_0": {
"patternProperties": {
"^.*bar$": {
"type": "null"
}
}
}
}
}
}
]
},
"tests": [
{
@ -354,16 +379,21 @@
{
"description": "extensible: true allows extra properties NOT matching pattern",
"database": {
"schemas": {
"patternProperties_5_0": {
"patternProperties": {
"f.*o": {
"type": "integer"
"types": [
{
"name": "patternProperties_5_0",
"schemas": {
"patternProperties_5_0": {
"patternProperties": {
"f.*o": {
"type": "integer"
}
},
"extensible": true
}
},
"extensible": true
}
}
}
]
},
"tests": [
{

View File

@ -73,13 +73,16 @@
}
}
}
},
{
"name": "family_entity",
"schemas": {
"family_entity": {
"family": "entity"
}
}
}
],
"schemas": {
"family_entity": {
"family": "entity"
}
}
]
},
"tests": [
{
@ -222,13 +225,16 @@
"type": "light.entity"
}
}
},
{
"name": "family_light_org",
"schemas": {
"family_light_org": {
"family": "light.organization"
}
}
}
],
"schemas": {
"family_light_org": {
"family": "light.organization"
}
}
]
},
"tests": [
{
@ -315,16 +321,24 @@
}
}
}
}
],
"schemas": {
"family_widget": {
"family": "widget"
},
"family_stock_widget": {
"family": "stock.widget"
{
"name": "family_widget",
"schemas": {
"family_widget": {
"family": "widget"
}
}
},
{
"name": "family_stock_widget",
"schemas": {
"family_stock_widget": {
"family": "stock.widget"
}
}
}
}
]
},
"tests": [
{
@ -463,20 +477,23 @@
]
}
}
}
],
"schemas": {
"oneOf_union": {
"oneOf": [
{
"type": "full.person"
},
{
"type": "full.bot"
},
{
"name": "oneOf_union",
"schemas": {
"oneOf_union": {
"oneOf": [
{
"type": "full.person"
},
{
"type": "full.bot"
}
]
}
]
}
}
}
]
},
"tests": [
{
@ -559,48 +576,58 @@
{
"description": "JSONB Field Bubble oneOf Discrimination (Promoted IDs)",
"database": {
"schemas": {
"metadata": {
"type": "object",
"properties": {
"type": {
"type": "string"
"types": [
{
"name": "metadata",
"schemas": {
"metadata": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"invoice.metadata": {
"type": "metadata",
"properties": {
"invoice_id": {
"type": "integer"
}
},
"required": [
"invoice_id"
]
},
"payment.metadata": {
"type": "metadata",
"properties": {
"payment_id": {
"type": "integer"
}
},
"required": [
"payment_id"
]
}
}
},
"invoice.metadata": {
"type": "metadata",
"properties": {
"invoice_id": {
"type": "integer"
{
"name": "oneOf_bubble",
"schemas": {
"oneOf_bubble": {
"oneOf": [
{
"type": "invoice.metadata"
},
{
"type": "payment.metadata"
}
]
}
},
"required": [
"invoice_id"
]
},
"payment.metadata": {
"type": "metadata",
"properties": {
"payment_id": {
"type": "integer"
}
},
"required": [
"payment_id"
]
},
"oneOf_bubble": {
"oneOf": [
{
"type": "invoice.metadata"
},
{
"type": "payment.metadata"
}
]
}
}
}
]
},
"tests": [
{
@ -675,16 +702,24 @@
}
}
}
}
],
"schemas": {
"stock_widget_validation": {
"type": "stock.widget"
},
"projected_widget_validation": {
"type": "projected.widget"
{
"name": "stock_widget_validation",
"schemas": {
"stock_widget_validation": {
"type": "stock.widget"
}
}
},
{
"name": "projected_widget_validation",
"schemas": {
"projected_widget_validation": {
"type": "projected.widget"
}
}
}
}
]
},
"tests": [
{

View File

@ -2,18 +2,23 @@
{
"description": "a schema given for prefixItems",
"database": {
"schemas": {
"prefixItems_0_0": {
"prefixItems": [
{
"type": "integer"
},
{
"type": "string"
"types": [
{
"name": "prefixItems_0_0",
"schemas": {
"prefixItems_0_0": {
"prefixItems": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
]
}
}
}
]
},
"tests": [
{
@ -91,14 +96,19 @@
{
"description": "prefixItems with boolean schemas",
"database": {
"schemas": {
"prefixItems_1_0": {
"prefixItems": [
true,
false
]
"types": [
{
"name": "prefixItems_1_0",
"schemas": {
"prefixItems_1_0": {
"prefixItems": [
true,
false
]
}
}
}
}
]
},
"tests": [
{
@ -138,16 +148,21 @@
{
"description": "additional items are allowed by default",
"database": {
"schemas": {
"prefixItems_2_0": {
"prefixItems": [
{
"type": "integer"
"types": [
{
"name": "prefixItems_2_0",
"schemas": {
"prefixItems_2_0": {
"prefixItems": [
{
"type": "integer"
}
],
"extensible": true
}
],
"extensible": true
}
}
}
]
},
"tests": [
{
@ -168,15 +183,20 @@
{
"description": "prefixItems with null instance elements",
"database": {
"schemas": {
"prefixItems_3_0": {
"prefixItems": [
{
"type": "null"
"types": [
{
"name": "prefixItems_3_0",
"schemas": {
"prefixItems_3_0": {
"prefixItems": [
{
"type": "null"
}
]
}
]
}
}
}
]
},
"tests": [
{
@ -195,16 +215,21 @@
{
"description": "extensible: true allows extra items with prefixItems",
"database": {
"schemas": {
"prefixItems_4_0": {
"prefixItems": [
{
"type": "integer"
"types": [
{
"name": "prefixItems_4_0",
"schemas": {
"prefixItems_4_0": {
"prefixItems": [
{
"type": "integer"
}
],
"extensible": true
}
],
"extensible": true
}
}
}
]
},
"tests": [
{

View File

@ -2,11 +2,16 @@
{
"description": "integer type matches integers",
"database": {
"schemas": {
"type_0_0": {
"type": "integer"
"types": [
{
"name": "type_0_0",
"schemas": {
"type_0_0": {
"type": "integer"
}
}
}
}
]
},
"tests": [
{
@ -95,11 +100,16 @@
{
"description": "number type matches numbers",
"database": {
"schemas": {
"type_1_0": {
"type": "number"
"types": [
{
"name": "type_1_0",
"schemas": {
"type_1_0": {
"type": "number"
}
}
}
}
]
},
"tests": [
{
@ -188,11 +198,16 @@
{
"description": "string type matches strings",
"database": {
"schemas": {
"type_2_0": {
"type": "string"
"types": [
{
"name": "type_2_0",
"schemas": {
"type_2_0": {
"type": "string"
}
}
}
}
]
},
"tests": [
{
@ -281,11 +296,16 @@
{
"description": "object type matches objects",
"database": {
"schemas": {
"type_3_0": {
"type": "object"
"types": [
{
"name": "type_3_0",
"schemas": {
"type_3_0": {
"type": "object"
}
}
}
}
]
},
"tests": [
{
@ -356,11 +376,16 @@
{
"description": "array type matches arrays",
"database": {
"schemas": {
"type_4_0": {
"type": "array"
"types": [
{
"name": "type_4_0",
"schemas": {
"type_4_0": {
"type": "array"
}
}
}
}
]
},
"tests": [
{
@ -431,11 +456,16 @@
{
"description": "boolean type matches booleans",
"database": {
"schemas": {
"type_5_0": {
"type": "boolean"
"types": [
{
"name": "type_5_0",
"schemas": {
"type_5_0": {
"type": "boolean"
}
}
}
}
]
},
"tests": [
{
@ -533,11 +563,16 @@
{
"description": "null type matches only the null object",
"database": {
"schemas": {
"type_6_0": {
"type": "null"
"types": [
{
"name": "type_6_0",
"schemas": {
"type_6_0": {
"type": "null"
}
}
}
}
]
},
"tests": [
{
@ -635,14 +670,19 @@
{
"description": "multiple types can be specified in an array",
"database": {
"schemas": {
"type_7_0": {
"type": [
"integer",
"string"
]
"types": [
{
"name": "type_7_0",
"schemas": {
"type_7_0": {
"type": [
"integer",
"string"
]
}
}
}
}
]
},
"tests": [
{
@ -713,13 +753,18 @@
{
"description": "type as array with one item",
"database": {
"schemas": {
"type_8_0": {
"type": [
"string"
]
"types": [
{
"name": "type_8_0",
"schemas": {
"type_8_0": {
"type": [
"string"
]
}
}
}
}
]
},
"tests": [
{
@ -745,15 +790,20 @@
{
"description": "type: array or object",
"database": {
"schemas": {
"type_9_0": {
"type": [
"array",
"object"
],
"items": {}
"types": [
{
"name": "type_9_0",
"schemas": {
"type_9_0": {
"type": [
"array",
"object"
],
"items": {}
}
}
}
}
]
},
"tests": [
{
@ -810,16 +860,21 @@
{
"description": "type: array, object or null",
"database": {
"schemas": {
"type_10_0": {
"type": [
"array",
"object",
"null"
],
"items": {}
"types": [
{
"name": "type_10_0",
"schemas": {
"type_10_0": {
"type": [
"array",
"object",
"null"
],
"items": {}
}
}
}
}
]
},
"tests": [
{
@ -876,12 +931,17 @@
{
"description": "extensible: true allows extra properties",
"database": {
"schemas": {
"type_11_0": {
"type": "object",
"extensible": true
"types": [
{
"name": "type_11_0",
"schemas": {
"type_11_0": {
"type": "object",
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,18 +2,23 @@
{
"description": "object properties validation",
"database": {
"schemas": {
"properties_0_0": {
"properties": {
"foo": {
"type": "integer"
},
"bar": {
"type": "string"
"types": [
{
"name": "properties_0_0",
"schemas": {
"properties_0_0": {
"properties": {
"foo": {
"type": "integer"
},
"bar": {
"type": "string"
}
}
}
}
}
}
]
},
"tests": [
{
@ -84,14 +89,19 @@
{
"description": "properties with boolean schema",
"database": {
"schemas": {
"properties_1_0": {
"properties": {
"foo": true,
"bar": false
"types": [
{
"name": "properties_1_0",
"schemas": {
"properties_1_0": {
"properties": {
"foo": true,
"bar": false
}
}
}
}
}
]
},
"tests": [
{
@ -142,30 +152,35 @@
{
"description": "properties with escaped characters",
"database": {
"schemas": {
"properties_2_0": {
"properties": {
"foo\nbar": {
"type": "number"
},
"foo\"bar": {
"type": "number"
},
"foo\\bar": {
"type": "number"
},
"foo\rbar": {
"type": "number"
},
"foo\tbar": {
"type": "number"
},
"foo\fbar": {
"type": "number"
"types": [
{
"name": "properties_2_0",
"schemas": {
"properties_2_0": {
"properties": {
"foo\nbar": {
"type": "number"
},
"foo\"bar": {
"type": "number"
},
"foo\\bar": {
"type": "number"
},
"foo\rbar": {
"type": "number"
},
"foo\tbar": {
"type": "number"
},
"foo\fbar": {
"type": "number"
}
}
}
}
}
}
]
},
"tests": [
{
@ -205,15 +220,20 @@
{
"description": "properties with null valued instance properties",
"database": {
"schemas": {
"properties_3_0": {
"properties": {
"foo": {
"type": "null"
"types": [
{
"name": "properties_3_0",
"schemas": {
"properties_3_0": {
"properties": {
"foo": {
"type": "null"
}
}
}
}
}
}
]
},
"tests": [
{
@ -233,25 +253,30 @@
"description": "properties whose names are Javascript object property names",
"comment": "Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object.",
"database": {
"schemas": {
"properties_4_0": {
"properties": {
"__proto__": {
"type": "number"
},
"toString": {
"types": [
{
"name": "properties_4_0",
"schemas": {
"properties_4_0": {
"properties": {
"length": {
"type": "string"
"__proto__": {
"type": "number"
},
"toString": {
"properties": {
"length": {
"type": "string"
}
}
},
"constructor": {
"type": "number"
}
}
},
"constructor": {
"type": "number"
}
}
}
}
]
},
"tests": [
{
@ -338,16 +363,21 @@
{
"description": "extensible: true allows extra properties",
"database": {
"schemas": {
"properties_5_0": {
"properties": {
"foo": {
"type": "integer"
"types": [
{
"name": "properties_5_0",
"schemas": {
"properties_5_0": {
"properties": {
"foo": {
"type": "integer"
}
},
"extensible": true
}
},
"extensible": true
}
}
}
]
},
"tests": [
{
@ -367,15 +397,20 @@
{
"description": "strict by default: extra properties invalid",
"database": {
"schemas": {
"properties_6_0": {
"properties": {
"foo": {
"type": "string"
"types": [
{
"name": "properties_6_0",
"schemas": {
"properties_6_0": {
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
]
},
"tests": [
{
@ -395,19 +430,24 @@
{
"description": "inheritance: nested object inherits strictness from strict parent",
"database": {
"schemas": {
"properties_7_0": {
"properties": {
"nested": {
"types": [
{
"name": "properties_7_0",
"schemas": {
"properties_7_0": {
"properties": {
"foo": {
"type": "string"
"nested": {
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -429,20 +469,25 @@
{
"description": "override: nested object allows extra properties if extensible: true",
"database": {
"schemas": {
"properties_8_0": {
"properties": {
"nested": {
"extensible": true,
"types": [
{
"name": "properties_8_0",
"schemas": {
"properties_8_0": {
"properties": {
"foo": {
"type": "string"
"nested": {
"extensible": true,
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -464,20 +509,25 @@
{
"description": "inheritance: nested object inherits looseness from loose parent",
"database": {
"schemas": {
"properties_9_0": {
"extensible": true,
"properties": {
"nested": {
"types": [
{
"name": "properties_9_0",
"schemas": {
"properties_9_0": {
"extensible": true,
"properties": {
"foo": {
"type": "string"
"nested": {
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -499,21 +549,26 @@
{
"description": "override: nested object enforces strictness if extensible: false",
"database": {
"schemas": {
"properties_10_0": {
"extensible": true,
"properties": {
"nested": {
"extensible": false,
"types": [
{
"name": "properties_10_0",
"schemas": {
"properties_10_0": {
"extensible": true,
"properties": {
"foo": {
"type": "string"
"nested": {
"extensible": false,
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -535,22 +590,27 @@
{
"description": "arrays: inline items inherit strictness from strict parent",
"database": {
"schemas": {
"properties_11_0": {
"properties": {
"list": {
"type": "array",
"items": {
"properties": {
"foo": {
"type": "string"
"types": [
{
"name": "properties_11_0",
"schemas": {
"properties_11_0": {
"properties": {
"list": {
"type": "array",
"items": {
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
}
}
}
]
},
"tests": [
{
@ -574,23 +634,28 @@
{
"description": "arrays: inline items inherit looseness from loose parent",
"database": {
"schemas": {
"properties_12_0": {
"extensible": true,
"properties": {
"list": {
"type": "array",
"items": {
"properties": {
"foo": {
"type": "string"
"types": [
{
"name": "properties_12_0",
"schemas": {
"properties_12_0": {
"extensible": true,
"properties": {
"list": {
"type": "array",
"items": {
"properties": {
"foo": {
"type": "string"
}
}
}
}
}
}
}
}
}
]
},
"tests": [
{

View File

@ -2,14 +2,19 @@
{
"description": "propertyNames validation",
"database": {
"schemas": {
"propertyNames_0_0": {
"propertyNames": {
"maxLength": 3
},
"extensible": true
"types": [
{
"name": "propertyNames_0_0",
"schemas": {
"propertyNames_0_0": {
"propertyNames": {
"maxLength": 3
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -82,14 +87,19 @@
{
"description": "propertyNames validation with pattern",
"database": {
"schemas": {
"propertyNames_1_0": {
"propertyNames": {
"pattern": "^a+$"
},
"extensible": true
"types": [
{
"name": "propertyNames_1_0",
"schemas": {
"propertyNames_1_0": {
"propertyNames": {
"pattern": "^a+$"
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -130,12 +140,17 @@
{
"description": "propertyNames with boolean schema true",
"database": {
"schemas": {
"propertyNames_2_0": {
"propertyNames": true,
"extensible": true
"types": [
{
"name": "propertyNames_2_0",
"schemas": {
"propertyNames_2_0": {
"propertyNames": true,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -163,12 +178,17 @@
{
"description": "propertyNames with boolean schema false",
"database": {
"schemas": {
"propertyNames_3_0": {
"propertyNames": false,
"extensible": true
"types": [
{
"name": "propertyNames_3_0",
"schemas": {
"propertyNames_3_0": {
"propertyNames": false,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -196,14 +216,19 @@
{
"description": "propertyNames with const",
"database": {
"schemas": {
"propertyNames_4_0": {
"propertyNames": {
"const": "foo"
},
"extensible": true
"types": [
{
"name": "propertyNames_4_0",
"schemas": {
"propertyNames_4_0": {
"propertyNames": {
"const": "foo"
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -242,17 +267,22 @@
{
"description": "propertyNames with enum",
"database": {
"schemas": {
"propertyNames_5_0": {
"propertyNames": {
"enum": [
"foo",
"bar"
]
},
"extensible": true
"types": [
{
"name": "propertyNames_5_0",
"schemas": {
"propertyNames_5_0": {
"propertyNames": {
"enum": [
"foo",
"bar"
]
},
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -303,14 +333,19 @@
{
"description": "extensible: true allows extra properties (checked by propertyNames)",
"database": {
"schemas": {
"propertyNames_6_0": {
"propertyNames": {
"maxLength": 3
},
"extensible": true
"types": [
{
"name": "propertyNames_6_0",
"schemas": {
"propertyNames_6_0": {
"propertyNames": {
"maxLength": 3
},
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,17 +2,22 @@
{
"description": "required validation",
"database": {
"schemas": {
"required_0_0": {
"properties": {
"foo": {},
"bar": {}
},
"required": [
"foo"
]
"types": [
{
"name": "required_0_0",
"schemas": {
"required_0_0": {
"properties": {
"foo": {},
"bar": {}
},
"required": [
"foo"
]
}
}
}
}
]
},
"tests": [
{
@ -87,13 +92,18 @@
{
"description": "required default validation",
"database": {
"schemas": {
"required_1_0": {
"properties": {
"foo": {}
"types": [
{
"name": "required_1_0",
"schemas": {
"required_1_0": {
"properties": {
"foo": {}
}
}
}
}
}
]
},
"tests": [
{
@ -110,14 +120,19 @@
{
"description": "required with empty array",
"database": {
"schemas": {
"required_2_0": {
"properties": {
"foo": {}
},
"required": []
"types": [
{
"name": "required_2_0",
"schemas": {
"required_2_0": {
"properties": {
"foo": {}
},
"required": []
}
}
}
}
]
},
"tests": [
{
@ -134,19 +149,24 @@
{
"description": "required with escaped characters",
"database": {
"schemas": {
"required_3_0": {
"required": [
"foo\nbar",
"foo\"bar",
"foo\\bar",
"foo\rbar",
"foo\tbar",
"foo\fbar"
],
"extensible": true
"types": [
{
"name": "required_3_0",
"schemas": {
"required_3_0": {
"required": [
"foo\nbar",
"foo\"bar",
"foo\\bar",
"foo\rbar",
"foo\tbar",
"foo\fbar"
],
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -183,16 +203,21 @@
"description": "required properties whose names are Javascript object property names",
"comment": "Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object.",
"database": {
"schemas": {
"required_4_0": {
"required": [
"__proto__",
"toString",
"constructor"
],
"extensible": true
"types": [
{
"name": "required_4_0",
"schemas": {
"required_4_0": {
"required": [
"__proto__",
"toString",
"constructor"
],
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -279,14 +304,19 @@
{
"description": "extensible: true allows extra properties in required",
"database": {
"schemas": {
"required_5_0": {
"required": [
"foo"
],
"extensible": true
"types": [
{
"name": "required_5_0",
"schemas": {
"required_5_0": {
"required": [
"foo"
],
"extensible": true
}
}
}
}
]
},
"tests": [
{

View File

@ -2,12 +2,17 @@
{
"description": "uniqueItems validation",
"database": {
"schemas": {
"uniqueItems_0_0": {
"uniqueItems": true,
"extensible": true
"types": [
{
"name": "uniqueItems_0_0",
"schemas": {
"uniqueItems_0_0": {
"uniqueItems": true,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -468,20 +473,25 @@
{
"description": "uniqueItems with an array of items",
"database": {
"schemas": {
"uniqueItems_1_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
"types": [
{
"name": "uniqueItems_1_0",
"schemas": {
"uniqueItems_1_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
}
],
"uniqueItems": true,
"extensible": true
}
],
"uniqueItems": true,
"extensible": true
}
}
}
]
},
"tests": [
{
@ -593,20 +603,25 @@
{
"description": "uniqueItems with an array of items and additionalItems=false",
"database": {
"schemas": {
"uniqueItems_2_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
"types": [
{
"name": "uniqueItems_2_0",
"schemas": {
"uniqueItems_2_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
}
],
"uniqueItems": true,
"items": false
}
],
"uniqueItems": true,
"items": false
}
}
}
]
},
"tests": [
{
@ -675,12 +690,17 @@
{
"description": "uniqueItems=false validation",
"database": {
"schemas": {
"uniqueItems_3_0": {
"uniqueItems": false,
"extensible": true
"types": [
{
"name": "uniqueItems_3_0",
"schemas": {
"uniqueItems_3_0": {
"uniqueItems": false,
"extensible": true
}
}
}
}
]
},
"tests": [
{
@ -920,20 +940,25 @@
{
"description": "uniqueItems=false with an array of items",
"database": {
"schemas": {
"uniqueItems_4_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
"types": [
{
"name": "uniqueItems_4_0",
"schemas": {
"uniqueItems_4_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
}
],
"uniqueItems": false,
"extensible": true
}
],
"uniqueItems": false,
"extensible": true
}
}
}
]
},
"tests": [
{
@ -1045,20 +1070,25 @@
{
"description": "uniqueItems=false with an array of items and additionalItems=false",
"database": {
"schemas": {
"uniqueItems_5_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
"types": [
{
"name": "uniqueItems_5_0",
"schemas": {
"uniqueItems_5_0": {
"prefixItems": [
{
"type": "boolean"
},
{
"type": "boolean"
}
],
"uniqueItems": false,
"items": false
}
],
"uniqueItems": false,
"items": false
}
}
}
]
},
"tests": [
{
@ -1127,12 +1157,17 @@
{
"description": "extensible: true allows extra items in uniqueItems",
"database": {
"schemas": {
"uniqueItems_6_0": {
"uniqueItems": true,
"extensible": true
"types": [
{
"name": "uniqueItems_6_0",
"schemas": {
"uniqueItems_6_0": {
"uniqueItems": true,
"extensible": true
}
}
}
}
]
},
"tests": [
{