{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spicrawl-com/json-schema/spicrawl-com-health-ready-schema.json",
  "title": "HealthReady",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spicrawl-com-health-api-openapi.yml#/components/schemas/HealthReady",
  "type": "object",
  "required": [
    "status",
    "checks"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ready",
        "not_ready"
      ],
      "description": "`ready` with HTTP 200; `not_ready` with HTTP 503."
    },
    "checks": {
      "type": "object",
      "description": "Per-dependency result. Keys: `postgres`, `redis` (when configured), `fetch`, `extract`, `render` (configured workers), and `accepting` (present only as `draining` during shutdown).",
      "properties": {
        "accepting": {
          "type": "string",
          "const": "draining",
          "description": "Present only while the process is shutting down."
        },
        "postgres": {
          "type": "string",
          "enum": [
            "ok",
            "unreachable"
          ]
        },
        "redis": {
          "type": "string",
          "enum": [
            "ok",
            "unreachable"
          ]
        }
      },
      "additionalProperties": {
        "type": "string",
        "enum": [
          "ok",
          "unreachable"
        ]
      }
    }
  }
}