RESTful Services · Schema
REST Error Response
Standard error response format for RESTful services, aligned with RFC 7807 Problem Details for HTTP APIs.
ArchitectureHTTPMicroservicesRESTWeb Services
Properties
| Name | Type | Description |
|---|---|---|
| type | string | URI reference identifying the problem type (RFC 7807) |
| title | string | Short, human-readable summary of the problem type |
| status | integer | HTTP status code (e.g., 400, 404, 422, 500) |
| detail | string | Human-readable explanation specific to this occurrence |
| instance | string | URI reference identifying the specific occurrence of the problem |
| errors | array | Field-level validation errors |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api-evangelist.github.io/restful-services/schemas/rest-error",
"title": "REST Error Response",
"description": "Standard error response format for RESTful services, aligned with RFC 7807 Problem Details for HTTP APIs.",
"type": "object",
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "URI reference identifying the problem type (RFC 7807)"
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type"
},
"status": {
"type": "integer",
"description": "HTTP status code (e.g., 400, 404, 422, 500)"
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence"
},
"instance": {
"type": "string",
"format": "uri",
"description": "URI reference identifying the specific occurrence of the problem"
},
"errors": {
"type": "array",
"description": "Field-level validation errors",
"items": {
"type": "object",
"properties": {
"field": { "type": "string" },
"message": { "type": "string" },
"code": { "type": "string" }
}
}
}
},
"required": ["status", "title"]
}