validator refactor progress

This commit is contained in:
2026-03-03 00:13:37 -05:00
parent e14f53e7d9
commit 3898c43742
81 changed files with 6331 additions and 7934 deletions

View File

@ -1,14 +1,18 @@
[
{
"description": "oneOf",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
"database": {
"schemas": [
{
"type": "integer"
},
{
"minimum": 2
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "integer"
},
{
"minimum": 2
}
]
}
]
},
@ -37,15 +41,19 @@
},
{
"description": "oneOf with base schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"oneOf": [
"database": {
"schemas": [
{
"minLength": 2
},
{
"maxLength": 4
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"oneOf": [
{
"minLength": 2
},
{
"maxLength": 4
}
]
}
]
},
@ -69,12 +77,16 @@
},
{
"description": "oneOf with boolean schemas, all true",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
true,
true,
true
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
true,
true,
true
]
}
]
},
"tests": [
@ -87,12 +99,16 @@
},
{
"description": "oneOf with boolean schemas, one true",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
true,
false,
false
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
true,
false,
false
]
}
]
},
"tests": [
@ -105,12 +121,16 @@
},
{
"description": "oneOf with boolean schemas, more than one true",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
true,
true,
false
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
true,
true,
false
]
}
]
},
"tests": [
@ -123,12 +143,16 @@
},
{
"description": "oneOf with boolean schemas, all false",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
false,
false,
false
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
false,
false,
false
]
}
]
},
"tests": [
@ -141,27 +165,31 @@
},
{
"description": "oneOf complex types",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
"database": {
"schemas": [
{
"properties": {
"bar": {
"type": "integer"
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"properties": {
"bar": {
"type": "integer"
}
},
"required": [
"bar"
]
},
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
}
},
"required": [
"bar"
]
},
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
}
]
@ -201,13 +229,17 @@
},
{
"description": "oneOf with empty schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
"database": {
"schemas": [
{
"type": "number"
},
{}
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "number"
},
{}
]
}
]
},
"tests": [
@ -225,25 +257,29 @@
},
{
"description": "oneOf with required",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"foo": true,
"bar": true,
"baz": true
},
"oneOf": [
"database": {
"schemas": [
{
"required": [
"foo",
"bar"
]
},
{
"required": [
"foo",
"baz"
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"foo": true,
"bar": true,
"baz": true
},
"oneOf": [
{
"required": [
"foo",
"bar"
]
},
{
"required": [
"foo",
"baz"
]
}
]
}
]
@ -294,21 +330,25 @@
},
{
"description": "oneOf with required (extensible)",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"extensible": true,
"oneOf": [
"database": {
"schemas": [
{
"required": [
"foo",
"bar"
]
},
{
"required": [
"foo",
"baz"
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"extensible": true,
"oneOf": [
{
"required": [
"foo",
"bar"
]
},
{
"required": [
"foo",
"baz"
]
}
]
}
]
@ -359,24 +399,28 @@
},
{
"description": "oneOf with missing optional property",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
"database": {
"schemas": [
{
"properties": {
"bar": true,
"baz": true
},
"required": [
"bar"
]
},
{
"properties": {
"foo": true
},
"required": [
"foo"
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"properties": {
"bar": true,
"baz": true
},
"required": [
"bar"
]
},
{
"properties": {
"foo": true
},
"required": [
"foo"
]
}
]
}
]
@ -415,13 +459,17 @@
},
{
"description": "nested oneOf, to check validation semantics",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "null"
"oneOf": [
{
"type": "null"
}
]
}
]
}
@ -442,31 +490,35 @@
},
{
"description": "extensible: true allows extra properties in oneOf",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
"database": {
"schemas": [
{
"properties": {
"bar": {
"type": "integer"
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"properties": {
"bar": {
"type": "integer"
}
},
"required": [
"bar"
]
},
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
}
},
"required": [
"bar"
]
},
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
],
"extensible": true
}
],
"extensible": true
]
},
"tests": [
{