{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thinair-co/json-schema/thinair-co-connection-health-response-schema.json",
  "title": "ConnectionHealthResponse",
  "description": "Health-probe result for a single connection. Surfaces dialect, server version, current database/schema, and ping/total latency. Costs 1 quota unit per call.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/data-thinair-co-openapi.json#/components/schemas/ConnectionHealthResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "True when the ping succeeded."
    },
    "db_type": {
      "type": "string",
      "enum": [
        "postgres",
        "mysql",
        "mssql"
      ]
    },
    "version": {
      "type": "string"
    },
    "current_database": {
      "type": [
        "string",
        "null"
      ]
    },
    "current_schema": {
      "type": [
        "string",
        "null"
      ]
    },
    "ping_ms": {
      "type": "integer",
      "minimum": 0,
      "description": "Wall time of the `SELECT 1` ping in milliseconds."
    },
    "total_ms": {
      "type": "integer",
      "minimum": 0,
      "description": "Wall time of the full probe (ping + version + schema lookup)."
    },
    "connection": {
      "type": "string",
      "description": "Resolved connection name (matches the row in `/v1/connections`)."
    }
  },
  "required": [
    "ok",
    "db_type",
    "version",
    "current_database",
    "current_schema",
    "ping_ms",
    "total_ms",
    "connection"
  ]
}