57 lines
1.3 KiB
JSON
57 lines
1.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://jwebot.example/schemas/incident.schema.json",
|
|
"title": "JWeBot privacy-safe incident record",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"version",
|
|
"incident_id",
|
|
"started_at",
|
|
"status",
|
|
"component",
|
|
"error_class"
|
|
],
|
|
"properties": {
|
|
"version": {"const": 1},
|
|
"incident_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{12,64}$"
|
|
},
|
|
"started_at": {"type": "string", "format": "date-time"},
|
|
"resolved_at": {
|
|
"type": ["string", "null"],
|
|
"format": "date-time"
|
|
},
|
|
"status": {
|
|
"enum": ["open", "resolved", "archived"]
|
|
},
|
|
"component": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9_.-]{1,80}$"
|
|
},
|
|
"error_class": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9_.-]{1,120}$"
|
|
},
|
|
"event_hash": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{0,64}$"
|
|
},
|
|
"group_hash": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{0,64}$"
|
|
},
|
|
"evidence": {
|
|
"type": "array",
|
|
"maxItems": 100,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": ["string", "number", "integer", "boolean", "null"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|