22 lines
663 B
JSON
22 lines
663 B
JSON
|
|
{
|
|||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|||
|
|
"$id": "https://aps.local/contracts/error.schema.json",
|
|||
|
|
"title": "ErrorEnvelope",
|
|||
|
|
"description": "HTTP 错误统一形状;SSE 里的错误见 events.schema.json 的 error 事件。",
|
|||
|
|
"type": "object",
|
|||
|
|
"required": ["error"],
|
|||
|
|
"properties": {
|
|||
|
|
"error": {
|
|||
|
|
"type": "object",
|
|||
|
|
"required": ["code", "message", "retryable"],
|
|||
|
|
"properties": {
|
|||
|
|
"code": { "type": "string" },
|
|||
|
|
"message": { "type": "string" },
|
|||
|
|
"retryable": { "type": "boolean" },
|
|||
|
|
"detail": {}
|
|||
|
|
},
|
|||
|
|
"additionalProperties": false
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"additionalProperties": false
|
|||
|
|
}
|