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,22 +4,21 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"base": {
"properties": {
"base_prop": {
"type": "string"
}
}
"$id": "base_0",
"properties": {
"base_prop": {
"type": "string"
}
},
"$ref": "#/$defs/base",
}
},
{
"$ref": "base_0",
"properties": {
"child_prop": {
"type": "string"
}
}
},
"$id": "merge_0_0"
}
]
},
@ -30,7 +29,8 @@
"base_prop": "a",
"child_prop": "b"
},
"valid": true
"valid": true,
"schema_id": "merge_0_0"
},
{
"description": "invalid when base property has wrong type",
@ -44,7 +44,8 @@
"code": "TYPE_MISMATCH",
"path": "/base_prop"
}
]
],
"schema_id": "merge_0_0"
}
]
},
@ -53,20 +54,18 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"base": {
"properties": {
"a": {
"type": "string"
}
},
"required": [
"a"
]
"$id": "base_1",
"properties": {
"a": {
"type": "string"
}
},
"$ref": "#/$defs/base",
"required": [
"a"
]
},
{
"$ref": "base_1",
"properties": {
"b": {
"type": "string"
@ -74,7 +73,8 @@
},
"required": [
"b"
]
],
"$id": "merge_1_0"
}
]
},
@ -85,7 +85,8 @@
"a": "ok",
"b": "ok"
},
"valid": true
"valid": true,
"schema_id": "merge_1_0"
},
{
"description": "invalid when base required missing",
@ -98,7 +99,8 @@
"code": "REQUIRED_FIELD_MISSING",
"path": "/a"
}
]
],
"schema_id": "merge_1_0"
},
{
"description": "invalid when child required missing",
@ -111,7 +113,8 @@
"code": "REQUIRED_FIELD_MISSING",
"path": "/b"
}
]
],
"schema_id": "merge_1_0"
}
]
},
@ -120,25 +123,23 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"base": {
"properties": {
"trigger": {
"type": "string"
},
"base_dep": {
"type": "string"
}
},
"dependencies": {
"trigger": [
"base_dep"
]
}
"$id": "base_2",
"properties": {
"trigger": {
"type": "string"
},
"base_dep": {
"type": "string"
}
},
"$ref": "#/$defs/base",
"dependencies": {
"trigger": [
"base_dep"
]
}
},
{
"$ref": "base_2",
"properties": {
"child_dep": {
"type": "string"
@ -148,7 +149,8 @@
"trigger": [
"child_dep"
]
}
},
"$id": "merge_2_0"
}
]
},
@ -160,7 +162,8 @@
"base_dep": "ok",
"child_dep": "ok"
},
"valid": true
"valid": true,
"schema_id": "merge_2_0"
},
{
"description": "invalid missing base dep",
@ -174,7 +177,8 @@
"code": "DEPENDENCY_FAILED",
"path": "/base_dep"
}
]
],
"schema_id": "merge_2_0"
},
{
"description": "invalid missing child dep",
@ -188,7 +192,8 @@
"code": "DEPENDENCY_FAILED",
"path": "/child_dep"
}
]
],
"schema_id": "merge_2_0"
}
]
},
@ -197,24 +202,22 @@
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"base": {
"properties": {
"a": {
"type": "string"
},
"b": {
"type": "string"
}
},
"form": [
"a",
"b"
]
"$id": "base_3",
"properties": {
"a": {
"type": "string"
},
"b": {
"type": "string"
}
},
"$ref": "#/$defs/base",
"form": [
"a",
"b"
]
},
{
"$ref": "base_3",
"properties": {
"c": {
"type": "string"
@ -222,7 +225,8 @@
},
"form": [
"c"
]
],
"$id": "merge_3_0"
}
]
},
@ -235,7 +239,8 @@
"c": "ok"
},
"valid": true,
"comment": "Verifies validator handles the unmerged metadata correctly (ignores it or handles replacement)"
"comment": "Verifies validator handles the unmerged metadata correctly (ignores it or handles replacement)",
"schema_id": "merge_3_0"
}
]
}