39 lines
887 B
JSON
39 lines
887 B
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Health Check Response",
|
|
"description": "Contract draft for GET /health responses.",
|
|
"type": "object",
|
|
"required": ["status", "version", "uptime_seconds"],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["ok", "degraded", "down"]
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
},
|
|
"uptime_seconds": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"checks": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": ["status"],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["pass", "fail", "warn"]
|
|
},
|
|
"latency_ms": {
|
|
"type": "number",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|