chore: JSPG Engine tuple decoupling and core routing optimizations
This commit is contained in:
@ -2,9 +2,8 @@
|
||||
{
|
||||
"description": "Hybrid Array Pathing",
|
||||
"database": {
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "hybrid_pathing",
|
||||
"schemas": {
|
||||
"hybrid_pathing": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primitives": {
|
||||
@ -69,7 +68,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
@ -123,7 +122,9 @@
|
||||
"errors": [
|
||||
{
|
||||
"code": "INVALID_TYPE",
|
||||
"details": { "path": "primitives/1" }
|
||||
"details": {
|
||||
"path": "primitives/1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -147,11 +148,15 @@
|
||||
"errors": [
|
||||
{
|
||||
"code": "REQUIRED_FIELD_MISSING",
|
||||
"details": { "path": "ad_hoc_objects/1/name" }
|
||||
"details": {
|
||||
"path": "ad_hoc_objects/1/name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "STRICT_PROPERTY_VIOLATION",
|
||||
"details": { "path": "ad_hoc_objects/1/age" }
|
||||
"details": {
|
||||
"path": "ad_hoc_objects/1/age"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -177,7 +182,9 @@
|
||||
"errors": [
|
||||
{
|
||||
"code": "MINIMUM_VIOLATED",
|
||||
"details": { "path": "entities/entity-beta/value" }
|
||||
"details": {
|
||||
"path": "entities/entity-beta/value"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -208,7 +215,9 @@
|
||||
"errors": [
|
||||
{
|
||||
"code": "INVALID_TYPE",
|
||||
"details": { "path": "deep_entities/parent-omega/nested/child-beta/flag" }
|
||||
"details": {
|
||||
"path": "deep_entities/parent-omega/nested/child-beta/flag"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -216,43 +225,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Polymorphic Structure Pathing",
|
||||
"description": "Ad-Hoc Union Pathing",
|
||||
"database": {
|
||||
"types": [
|
||||
{
|
||||
"name": "widget",
|
||||
"variations": ["widget"],
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "widget",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"type": { "type": "string" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "stock.widget",
|
||||
"type": "widget",
|
||||
"properties": {
|
||||
"kind": { "type": "string" },
|
||||
"amount": { "type": "integer" },
|
||||
"details": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nested_metric": { "type": "number" }
|
||||
},
|
||||
"required": ["nested_metric"]
|
||||
}
|
||||
},
|
||||
"required": ["amount", "details"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "polymorphic_pathing",
|
||||
"schemas": {
|
||||
"ad_hoc_pathing": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metadata_bubbles": {
|
||||
@ -260,26 +236,98 @@
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$id": "contact_metadata",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": { "const": "contact" },
|
||||
"phone": { "type": "string" }
|
||||
},
|
||||
"required": ["phone"]
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$id": "invoice_metadata",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": { "const": "invoice" },
|
||||
"invoice_id": { "type": "integer" }
|
||||
},
|
||||
"required": ["invoice_id"]
|
||||
"type": "integer"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "oneOf arrays natively support disjoint primitive types dynamically mapped into topological paths natively",
|
||||
"data": {
|
||||
"metadata_bubbles": [
|
||||
100,
|
||||
"metadata string",
|
||||
true
|
||||
]
|
||||
},
|
||||
"schema_id": "ad_hoc_pathing",
|
||||
"action": "validate",
|
||||
"expect": {
|
||||
"success": false,
|
||||
"errors": [
|
||||
{
|
||||
"code": "NO_ONEOF_MATCH",
|
||||
"details": {
|
||||
"path": "metadata_bubbles/2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Polymorphic Family Pathing",
|
||||
"database": {
|
||||
"types": [
|
||||
{
|
||||
"name": "widget",
|
||||
"variations": [
|
||||
"widget"
|
||||
],
|
||||
"schemas": {
|
||||
"widget": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"stock.widget": {
|
||||
"type": "widget",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"details": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nested_metric": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"nested_metric"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"amount",
|
||||
"details"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemas": {
|
||||
"family_pathing": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"table_families": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@ -288,33 +336,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "oneOf tags natively bubble specific schema paths into deep array roots",
|
||||
"data": {
|
||||
"metadata_bubbles": [
|
||||
{ "type": "invoice", "invoice_id": 100 },
|
||||
{ "type": "contact", "phone": 12345, "rogue_field": "x" }
|
||||
]
|
||||
},
|
||||
"schema_id": "polymorphic_pathing",
|
||||
"action": "validate",
|
||||
"expect": {
|
||||
"success": false,
|
||||
"errors": [
|
||||
{
|
||||
"code": "INVALID_TYPE",
|
||||
"details": { "path": "metadata_bubbles/1/phone" }
|
||||
},
|
||||
{
|
||||
"code": "STRICT_PROPERTY_VIOLATION",
|
||||
"details": { "path": "metadata_bubbles/1/rogue_field" }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"description": "families mechanically map physical variants directly onto topological uuid array paths",
|
||||
"data": {
|
||||
@ -324,7 +349,9 @@
|
||||
"type": "widget",
|
||||
"kind": "stock",
|
||||
"amount": 500,
|
||||
"details": { "nested_metric": 42.0 }
|
||||
"details": {
|
||||
"nested_metric": 42.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "widget-2",
|
||||
@ -332,32 +359,40 @@
|
||||
"kind": "stock",
|
||||
"amount": "not_an_int",
|
||||
"details": {
|
||||
"stray_child": true
|
||||
"stray_child": true
|
||||
},
|
||||
"unexpected_root_prop": "hi"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema_id": "polymorphic_pathing",
|
||||
"schema_id": "family_pathing",
|
||||
"action": "validate",
|
||||
"expect": {
|
||||
"success": false,
|
||||
"errors": [
|
||||
{
|
||||
"code": "INVALID_TYPE",
|
||||
"details": { "path": "table_families/widget-2/amount" }
|
||||
"details": {
|
||||
"path": "table_families/widget-2/amount"
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "REQUIRED_FIELD_MISSING",
|
||||
"details": { "path": "table_families/widget-2/details/nested_metric" }
|
||||
"details": {
|
||||
"path": "table_families/widget-2/details/nested_metric"
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "STRICT_PROPERTY_VIOLATION",
|
||||
"details": { "path": "table_families/widget-2/details/stray_child" }
|
||||
"details": {
|
||||
"path": "table_families/widget-2/details/stray_child"
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "STRICT_PROPERTY_VIOLATION",
|
||||
"details": { "path": "table_families/widget-2/unexpected_root_prop" }
|
||||
"details": {
|
||||
"path": "table_families/widget-2/unexpected_root_prop"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user