{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/systemprompt-io/json-schema/systemprompt-io-detailed-health-response-schema.json",
  "title": "DetailedHealthResponse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/systemprompt-io-openapi.json#/components/schemas/DetailedHealthResponse",
  "type": "object",
  "required": [
    "status",
    "version",
    "components"
  ],
  "properties": {
    "components": {
      "$ref": "#/$defs/ComponentsHealth"
    },
    "status": {
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "$defs": {
    "ComponentHealth": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "latency_ms": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "minimum": 0
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string"
        }
      }
    },
    "ComponentsHealth": {
      "type": "object",
      "required": [
        "database"
      ],
      "properties": {
        "database": {
          "$ref": "#/$defs/ComponentHealth"
        },
        "fly": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/ComponentHealth"
            }
          ]
        }
      }
    }
  }
}