JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/rulesets_ServeErrorRule",
"title": "rulesets_ServeErrorRule",
"allOf": [
{
"$ref": "#/components/schemas/rulesets_Rule"
},
{
"properties": {
"action": {
"enum": [
"serve_error"
]
},
"action_parameters": {
"properties": {
"content": {
"description": "Error response content.",
"example": "{\"error\": \"1xxx error occurred\"}\n",
"maxLength": 10240,
"minLength": 1,
"title": "Content",
"type": "string"
},
"content_type": {
"description": "Content-type header to set with the response.",
"enum": [
"application/json",
"text/xml",
"text/plain",
"text/html"
],
"example": "application/json",
"title": "Content Type",
"type": "string"
},
"status_code": {
"description": "The status code to use for the error.",
"example": 500,
"maximum": 999,
"minimum": 400,
"title": "Status Code",
"type": "number"
}
}
},
"description": {
"example": "Serve a JSON response to api users on error"
}
},
"title": "Serve Error rule"
}
]
}