JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/rulesets_BlockRule",
"title": "rulesets_BlockRule",
"allOf": [
{
"$ref": "#/components/schemas/rulesets_Rule"
},
{
"properties": {
"action": {
"enum": [
"block"
]
},
"action_parameters": {
"properties": {
"response": {
"description": "The response to show when the block is applied.",
"properties": {
"content": {
"description": "The content to return.",
"example": "{\n \"success\": false,\n \"error\": \"you have been blocked\"\n}",
"minLength": 1,
"title": "Content",
"type": "string"
},
"content_type": {
"description": "The type of the content to return.",
"example": "application/json",
"minLength": 1,
"title": "Content type",
"type": "string"
},
"status_code": {
"description": "The status code to return.",
"maximum": 499,
"minimum": 400,
"title": "Status code",
"type": "integer"
}
},
"required": [
"status_code",
"content",
"content_type"
],
"title": "Response",
"type": "object"
}
}
},
"description": {
"example": "Block when the IP address is not 1.1.1.1"
}
},
"title": "Block rule"
}
]
}