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,9 +1,13 @@
[
{
"description": "const validation",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 2
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 2
}
]
},
"tests": [
{
@ -25,16 +29,20 @@
},
{
"description": "const with object",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"foo": "bar",
"baz": "bax"
},
"properties": {
"foo": {},
"baz": {}
}
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"foo": "bar",
"baz": "bax"
},
"properties": {
"foo": {},
"baz": {}
}
}
]
},
"tests": [
{
@ -72,11 +80,15 @@
},
{
"description": "const with array",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": [
"database": {
"schemas": [
{
"foo": "bar"
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": [
{
"foo": "bar"
}
]
}
]
},
@ -110,9 +122,13 @@
},
{
"description": "const with null",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": null
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": null
}
]
},
"tests": [
{
@ -129,9 +145,13 @@
},
{
"description": "const with false does not match 0",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": false
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": false
}
]
},
"tests": [
{
@ -153,9 +173,13 @@
},
{
"description": "const with true does not match 1",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": true
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": true
}
]
},
"tests": [
{
@ -177,10 +201,14 @@
},
{
"description": "const with [false] does not match [0]",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": [
false
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": [
false
]
}
]
},
"tests": [
@ -209,10 +237,14 @@
},
{
"description": "const with [true] does not match [1]",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": [
true
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": [
true
]
}
]
},
"tests": [
@ -241,11 +273,15 @@
},
{
"description": "const with {\"a\": false} does not match {\"a\": 0}",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"a": false
}
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"a": false
}
}
]
},
"tests": [
{
@ -273,11 +309,15 @@
},
{
"description": "const with {\"a\": true} does not match {\"a\": 1}",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"a": true
}
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"a": true
}
}
]
},
"tests": [
{
@ -305,9 +345,13 @@
},
{
"description": "const with 0 does not match other zero-like types",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 0
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 0
}
]
},
"tests": [
{
@ -344,9 +388,13 @@
},
{
"description": "const with 1 does not match true",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 1
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 1
}
]
},
"tests": [
{
@ -368,9 +416,13 @@
},
{
"description": "const with -2.0 matches integer and float types",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": -2.0
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": -2.0
}
]
},
"tests": [
{
@ -402,9 +454,13 @@
},
{
"description": "float and integers are equal up to 64-bit representation limits",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 9007199254740992
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": 9007199254740992
}
]
},
"tests": [
{
@ -431,9 +487,13 @@
},
{
"description": "nul characters in strings",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "hello\u0000there"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "hello\u0000there"
}
]
},
"tests": [
{
@ -450,10 +510,14 @@
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "μ",
"$comment": "U+03BC"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "μ",
"$comment": "U+03BC"
}
]
},
"tests": [
{
@ -472,10 +536,14 @@
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "ä",
"$comment": "U+00E4"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "ä",
"$comment": "U+00E4"
}
]
},
"tests": [
{
@ -494,12 +562,16 @@
},
{
"description": "extensible: true allows extra properties in const object match",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"a": 1
},
"extensible": true
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": {
"a": 1
},
"extensible": true
}
]
},
"tests": [
{