aps-agent/contracts/schemas/error.schema.json

27 lines
808 B
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$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 事件。",
"$ref": "#/$defs/ErrorEnvelope",
"$defs": {
"ErrorEnvelope": {
"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
}
}
}