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

@ -1,6 +1,6 @@
[
{
"description": "Entity families with dot patterns",
"description": "Entity families via pure $ref graph",
"database": {
"types": [
{
@ -17,8 +17,7 @@
"type": "string"
},
"type": {
"type": "string",
"const": "entity"
"type": "string"
}
}
},
@ -65,7 +64,7 @@
},
{
"$id": "person.light",
"$ref": "person"
"$ref": "entity.light"
}
]
}
@ -113,7 +112,7 @@
"valid": true
},
{
"description": "Dot pattern family matches entity.light",
"description": "Graph family matches entity.light",
"schema_id": "get_light_entities.response",
"data": {
"id": "3",
@ -122,25 +121,29 @@
"valid": true
},
{
"description": "Dot pattern family matches person.light",
"description": "Graph family matches person.light (because it $refs entity.light)",
"schema_id": "get_light_entities.response",
"data": {
"id": "4",
"type": "person",
"name": "ACME",
"first_name": "John"
"type": "person"
},
"valid": true
},
{
"description": "Dot pattern family excludes organization (missing .light schema, constraint violation)",
"description": "Graph family excludes organization (missing .light schema that $refs entity.light)",
"schema_id": "get_light_entities.response",
"data": {
"id": "5",
"type": "organization",
"name": "ACME"
},
"valid": false
"valid": false,
"expect_errors": [
{
"code": "FAMILY_MISMATCH",
"path": ""
}
]
}
]
},
@ -182,20 +185,14 @@
},
"tests": [
{
"description": "Ad-hoc family does not implicitly match descendants (no magical implicit hierarchy on normal ad-hoc schemas)",
"description": "Ad-hoc family matches strictly by shape (no magic variations for base schemas)",
"schema_id": "get_widgets.response",
"data": {
"id": "1",
"widget_type": "special",
"special_feature": "yes"
},
"valid": false,
"expect_errors": [
{
"code": "FAMILY_MISMATCH",
"path": ""
}
]
"valid": true
}
]
}