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,7 +4,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {
"type": "integer"
@ -12,7 +11,8 @@
"bar": {
"type": "string"
}
}
},
"$id": "properties_0_0"
}
]
},
@ -23,7 +23,8 @@
"foo": 1,
"bar": "baz"
},
"valid": true
"valid": true,
"schema_id": "properties_0_0"
},
{
"description": "one property invalid is invalid",
@ -31,7 +32,8 @@
"foo": 1,
"bar": {}
},
"valid": false
"valid": false,
"schema_id": "properties_0_0"
},
{
"description": "both properties invalid is invalid",
@ -39,22 +41,26 @@
"foo": [],
"bar": {}
},
"valid": false
"valid": false,
"schema_id": "properties_0_0"
},
{
"description": "doesn't invalidate other properties",
"data": {},
"valid": true
"valid": true,
"schema_id": "properties_0_0"
},
{
"description": "ignores arrays",
"data": [],
"valid": true
"valid": true,
"schema_id": "properties_0_0"
},
{
"description": "ignores other non-objects",
"data": 12,
"valid": true
"valid": true,
"schema_id": "properties_0_0"
}
]
},
@ -63,11 +69,11 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": true,
"bar": false
}
},
"$id": "properties_1_0"
}
]
},
@ -75,21 +81,24 @@
{
"description": "no property present is valid",
"data": {},
"valid": true
"valid": true,
"schema_id": "properties_1_0"
},
{
"description": "only 'true' property present is valid",
"data": {
"foo": 1
},
"valid": true
"valid": true,
"schema_id": "properties_1_0"
},
{
"description": "only 'false' property present is invalid",
"data": {
"bar": 2
},
"valid": false
"valid": false,
"schema_id": "properties_1_0"
},
{
"description": "both properties present is invalid",
@ -97,7 +106,8 @@
"foo": 1,
"bar": 2
},
"valid": false
"valid": false,
"schema_id": "properties_1_0"
}
]
},
@ -106,7 +116,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo\nbar": {
"type": "number"
@ -126,7 +135,8 @@
"foo\fbar": {
"type": "number"
}
}
},
"$id": "properties_2_0"
}
]
},
@ -141,7 +151,8 @@
"foo\tbar": 1,
"foo\fbar": 1
},
"valid": true
"valid": true,
"schema_id": "properties_2_0"
},
{
"description": "object with strings is invalid",
@ -153,7 +164,8 @@
"foo\tbar": "1",
"foo\fbar": "1"
},
"valid": false
"valid": false,
"schema_id": "properties_2_0"
}
]
},
@ -162,12 +174,12 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {
"type": "null"
}
}
},
"$id": "properties_3_0"
}
]
},
@ -177,7 +189,8 @@
"data": {
"foo": null
},
"valid": true
"valid": true,
"schema_id": "properties_3_0"
}
]
},
@ -187,7 +200,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"__proto__": {
"type": "number"
@ -202,7 +214,8 @@
"constructor": {
"type": "number"
}
}
},
"$id": "properties_4_0"
}
]
},
@ -210,24 +223,28 @@
{
"description": "ignores arrays",
"data": [],
"valid": true
"valid": true,
"schema_id": "properties_4_0"
},
{
"description": "ignores other non-objects",
"data": 12,
"valid": true
"valid": true,
"schema_id": "properties_4_0"
},
{
"description": "none of the properties mentioned",
"data": {},
"valid": true
"valid": true,
"schema_id": "properties_4_0"
},
{
"description": "__proto__ not valid",
"data": {
"__proto__": "foo"
},
"valid": false
"valid": false,
"schema_id": "properties_4_0"
},
{
"description": "toString not valid",
@ -236,7 +253,8 @@
"length": 37
}
},
"valid": false
"valid": false,
"schema_id": "properties_4_0"
},
{
"description": "constructor not valid",
@ -245,7 +263,8 @@
"length": 37
}
},
"valid": false
"valid": false,
"schema_id": "properties_4_0"
},
{
"description": "all present and valid",
@ -256,7 +275,8 @@
},
"constructor": 37
},
"valid": true
"valid": true,
"schema_id": "properties_4_0"
}
]
},
@ -265,13 +285,13 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {
"type": "integer"
}
},
"extensible": true
"extensible": true,
"$id": "properties_5_0"
}
]
},
@ -282,7 +302,8 @@
"foo": 1,
"bar": "baz"
},
"valid": true
"valid": true,
"schema_id": "properties_5_0"
}
]
},
@ -291,12 +312,12 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {
"type": "string"
}
}
},
"$id": "properties_6_0"
}
]
},
@ -307,7 +328,8 @@
"foo": "bar",
"extra": 1
},
"valid": false
"valid": false,
"schema_id": "properties_6_0"
}
]
},
@ -316,7 +338,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"nested": {
"properties": {
@ -325,7 +346,8 @@
}
}
}
}
},
"$id": "properties_7_0"
}
]
},
@ -338,7 +360,8 @@
"extra": 1
}
},
"valid": false
"valid": false,
"schema_id": "properties_7_0"
}
]
},
@ -347,7 +370,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"nested": {
"extensible": true,
@ -357,7 +379,8 @@
}
}
}
}
},
"$id": "properties_8_0"
}
]
},
@ -370,7 +393,8 @@
"extra": 1
}
},
"valid": true
"valid": true,
"schema_id": "properties_8_0"
}
]
},
@ -379,7 +403,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"extensible": true,
"properties": {
"nested": {
@ -389,7 +412,8 @@
}
}
}
}
},
"$id": "properties_9_0"
}
]
},
@ -402,7 +426,8 @@
"extra": 1
}
},
"valid": true
"valid": true,
"schema_id": "properties_9_0"
}
]
},
@ -411,7 +436,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"extensible": true,
"properties": {
"nested": {
@ -422,7 +446,8 @@
}
}
}
}
},
"$id": "properties_10_0"
}
]
},
@ -435,7 +460,8 @@
"extra": 1
}
},
"valid": false
"valid": false,
"schema_id": "properties_10_0"
}
]
},
@ -444,7 +470,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"list": {
"type": "array",
@ -456,7 +481,8 @@
}
}
}
}
},
"$id": "properties_11_0"
}
]
},
@ -471,7 +497,8 @@
}
]
},
"valid": false
"valid": false,
"schema_id": "properties_11_0"
}
]
},
@ -480,7 +507,6 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"extensible": true,
"properties": {
"list": {
@ -493,7 +519,8 @@
}
}
}
}
},
"$id": "properties_12_0"
}
]
},
@ -508,7 +535,8 @@
}
]
},
"valid": true
"valid": true,
"schema_id": "properties_12_0"
}
]
}