drop error improvements across the board for localization

This commit is contained in:
2026-06-23 17:47:19 -04:00
parent d77765cb61
commit b0377e076e
42 changed files with 8857 additions and 773 deletions

View File

@ -8,27 +8,46 @@
"schemas": {
"full.person": {
"type": "object",
"include": ["emailable", "phonable"],
"include": [
"emailable",
"phonable"
],
"properties": {
"name": { "type": "string" }
"name": {
"type": "string"
}
},
"required": ["name"]
"required": [
"name"
]
}
},
"traits": {
"emailable": {
"properties": {
"email": { "type": "string" }
"email": {
"type": "string"
}
},
"required": ["email"],
"display": ["email"]
"required": [
"email"
],
"display": [
"email"
]
},
"phonable": {
"properties": {
"phone": { "type": "string" }
"phone": {
"type": "string"
}
},
"required": ["phone"],
"display": ["phone"]
"required": [
"phone"
],
"display": [
"phone"
]
}
}
}
@ -61,8 +80,12 @@
"errors": [
{
"code": "REQUIRED_FIELD_MISSING",
"values": {
"field_name": "email"
},
"details": {
"path": "email"
"path": "email",
"schema": "full.person"
}
}
]
@ -79,7 +102,9 @@
"schemas": {
"full.person": {
"type": "object",
"include": ["emailable"],
"include": [
"emailable"
],
"properties": {
"email": {
"type": "string",
@ -91,7 +116,9 @@
"traits": {
"emailable": {
"properties": {
"email": { "type": "string" }
"email": {
"type": "string"
}
}
}
}
@ -111,8 +138,13 @@
"errors": [
{
"code": "MAX_LENGTH_VIOLATED",
"values": {
"limit": "5",
"count": "26"
},
"details": {
"path": "email"
"path": "email",
"schema": "full.person"
}
}
]
@ -129,7 +161,9 @@
"schemas": {
"full.person": {
"type": "object",
"include": ["nonexistent_trait"]
"include": [
"nonexistent_trait"
]
}
}
}
@ -143,7 +177,14 @@
"success": false,
"errors": [
{
"code": "TRAIT_NOT_FOUND"
"code": "TRAIT_NOT_FOUND",
"values": {
"include": "nonexistent_trait"
},
"details": {
"path": "full.person",
"schema": "full.person"
}
}
]
}
@ -159,15 +200,21 @@
"schemas": {
"full.person": {
"type": "object",
"include": ["trait_a"]
"include": [
"trait_a"
]
}
},
"traits": {
"trait_a": {
"include": ["trait_b"]
"include": [
"trait_b"
]
},
"trait_b": {
"include": ["trait_a"]
"include": [
"trait_a"
]
}
}
}
@ -181,11 +228,18 @@
"success": false,
"errors": [
{
"code": "CIRCULAR_INCLUDE_DETECTED"
"code": "CIRCULAR_INCLUDE_DETECTED",
"values": {
"include": "trait_a"
},
"details": {
"path": "full.person/include/trait_a/include/trait_b",
"schema": "full.person"
}
}
]
}
}
]
}
]
]