significantly simplified the validator and work continues on query

This commit is contained in:
2026-03-03 17:58:31 -05:00
parent 3898c43742
commit e7f20e2cb6
58 changed files with 5446 additions and 5693 deletions

View File

@ -4,10 +4,10 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"const": 0
}
},
"$id": "if-then-else_0_0"
}
]
},
@ -15,12 +15,14 @@
{
"description": "valid when valid against lone if",
"data": 0,
"valid": true
"valid": true,
"schema_id": "if-then-else_0_0"
},
{
"description": "valid when invalid against lone if",
"data": "hello",
"valid": true
"valid": true,
"schema_id": "if-then-else_0_0"
}
]
},
@ -29,10 +31,10 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"then": {
"const": 0
}
},
"$id": "if-then-else_1_0"
}
]
},
@ -40,12 +42,14 @@
{
"description": "valid when valid against lone then",
"data": 0,
"valid": true
"valid": true,
"schema_id": "if-then-else_1_0"
},
{
"description": "valid when invalid against lone then",
"data": "hello",
"valid": true
"valid": true,
"schema_id": "if-then-else_1_0"
}
]
},
@ -54,10 +58,10 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"else": {
"const": 0
}
},
"$id": "if-then-else_2_0"
}
]
},
@ -65,12 +69,14 @@
{
"description": "valid when valid against lone else",
"data": 0,
"valid": true
"valid": true,
"schema_id": "if-then-else_2_0"
},
{
"description": "valid when invalid against lone else",
"data": "hello",
"valid": true
"valid": true,
"schema_id": "if-then-else_2_0"
}
]
},
@ -79,13 +85,13 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"exclusiveMaximum": 0
},
"then": {
"minimum": -10
}
},
"$id": "if-then-else_3_0"
}
]
},
@ -93,17 +99,20 @@
{
"description": "valid through then",
"data": -1,
"valid": true
"valid": true,
"schema_id": "if-then-else_3_0"
},
{
"description": "invalid through then",
"data": -100,
"valid": false
"valid": false,
"schema_id": "if-then-else_3_0"
},
{
"description": "valid when if test fails",
"data": 3,
"valid": true
"valid": true,
"schema_id": "if-then-else_3_0"
}
]
},
@ -112,13 +121,13 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"exclusiveMaximum": 0
},
"else": {
"multipleOf": 2
}
},
"$id": "if-then-else_4_0"
}
]
},
@ -126,17 +135,20 @@
{
"description": "valid when if test passes",
"data": -1,
"valid": true
"valid": true,
"schema_id": "if-then-else_4_0"
},
{
"description": "valid through else",
"data": 4,
"valid": true
"valid": true,
"schema_id": "if-then-else_4_0"
},
{
"description": "invalid through else",
"data": 3,
"valid": false
"valid": false,
"schema_id": "if-then-else_4_0"
}
]
},
@ -145,7 +157,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"exclusiveMaximum": 0
},
@ -154,7 +165,8 @@
},
"else": {
"multipleOf": 2
}
},
"$id": "if-then-else_5_0"
}
]
},
@ -162,22 +174,26 @@
{
"description": "valid through then",
"data": -1,
"valid": true
"valid": true,
"schema_id": "if-then-else_5_0"
},
{
"description": "invalid through then",
"data": -100,
"valid": false
"valid": false,
"schema_id": "if-then-else_5_0"
},
{
"description": "valid through else",
"data": 4,
"valid": true
"valid": true,
"schema_id": "if-then-else_5_0"
},
{
"description": "invalid through else",
"data": 3,
"valid": false
"valid": false,
"schema_id": "if-then-else_5_0"
}
]
},
@ -186,7 +202,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"allOf": [
{
"if": {
@ -203,7 +218,8 @@
"multipleOf": 2
}
}
]
],
"$id": "if-then-else_6_0"
}
]
},
@ -211,12 +227,14 @@
{
"description": "valid, but would have been invalid through then",
"data": -100,
"valid": true
"valid": true,
"schema_id": "if-then-else_6_0"
},
{
"description": "valid, but would have been invalid through else",
"data": 3,
"valid": true
"valid": true,
"schema_id": "if-then-else_6_0"
}
]
},
@ -225,14 +243,14 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": true,
"then": {
"const": "then"
},
"else": {
"const": "else"
}
},
"$id": "if-then-else_7_0"
}
]
},
@ -240,12 +258,14 @@
{
"description": "boolean schema true in if always chooses the then path (valid)",
"data": "then",
"valid": true
"valid": true,
"schema_id": "if-then-else_7_0"
},
{
"description": "boolean schema true in if always chooses the then path (invalid)",
"data": "else",
"valid": false
"valid": false,
"schema_id": "if-then-else_7_0"
}
]
},
@ -254,14 +274,14 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": false,
"then": {
"const": "then"
},
"else": {
"const": "else"
}
},
"$id": "if-then-else_8_0"
}
]
},
@ -269,12 +289,14 @@
{
"description": "boolean schema false in if always chooses the else path (invalid)",
"data": "then",
"valid": false
"valid": false,
"schema_id": "if-then-else_8_0"
},
{
"description": "boolean schema false in if always chooses the else path (valid)",
"data": "else",
"valid": true
"valid": true,
"schema_id": "if-then-else_8_0"
}
]
},
@ -283,7 +305,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"then": {
"const": "yes"
},
@ -292,7 +313,8 @@
},
"if": {
"maxLength": 4
}
},
"$id": "if-then-else_9_0"
}
]
},
@ -300,22 +322,26 @@
{
"description": "yes redirects to then and passes",
"data": "yes",
"valid": true
"valid": true,
"schema_id": "if-then-else_9_0"
},
{
"description": "other redirects to else and passes",
"data": "other",
"valid": true
"valid": true,
"schema_id": "if-then-else_9_0"
},
{
"description": "no redirects to then and fails",
"data": "no",
"valid": false
"valid": false,
"schema_id": "if-then-else_9_0"
},
{
"description": "invalid redirects to else and fails",
"data": "invalid",
"valid": false
"valid": false,
"schema_id": "if-then-else_9_0"
}
]
},
@ -327,7 +353,8 @@
"if": {
"const": 1
},
"then": false
"then": false,
"$id": "if-then-else_10_0"
}
]
},
@ -335,12 +362,14 @@
{
"description": "matches if → then=false → invalid",
"data": 1,
"valid": false
"valid": false,
"schema_id": "if-then-else_10_0"
},
{
"description": "does not match if → then ignored → valid",
"data": 2,
"valid": true
"valid": true,
"schema_id": "if-then-else_10_0"
}
]
},
@ -352,7 +381,8 @@
"if": {
"const": 1
},
"else": false
"else": false,
"$id": "if-then-else_11_0"
}
]
},
@ -360,12 +390,14 @@
{
"description": "matches if → else ignored → valid",
"data": 1,
"valid": true
"valid": true,
"schema_id": "if-then-else_11_0"
},
{
"description": "does not match if → else executes → invalid",
"data": 2,
"valid": false
"valid": false,
"schema_id": "if-then-else_11_0"
}
]
},
@ -374,7 +406,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"properties": {
"foo": {
@ -395,7 +426,8 @@
"bar"
]
},
"extensible": true
"extensible": true,
"$id": "if-then-else_12_0"
}
]
},
@ -407,7 +439,8 @@
"bar": 2,
"extra": "prop"
},
"valid": true
"valid": true,
"schema_id": "if-then-else_12_0"
}
]
},
@ -416,7 +449,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"properties": {
"foo": {
@ -433,7 +465,8 @@
"const": 2
}
}
}
},
"$id": "if-then-else_13_0"
}
]
},
@ -444,7 +477,8 @@
"foo": 1,
"bar": 2
},
"valid": true
"valid": true,
"schema_id": "if-then-else_13_0"
},
{
"description": "fails on extra property z explicitly",
@ -453,7 +487,8 @@
"bar": 2,
"z": 3
},
"valid": false
"valid": false,
"schema_id": "if-then-else_13_0"
}
]
}