{
  "openapi": "3.1.0",
  "info": {
    "title": "Health",
    "description": "API service for App Factory reusable modules",
    "version": "1.0.0",
    "x-source-commit": "f33cc2b935f31b36240d724948dc8b9c765430cc"
  },
  "paths": {
    "/api/v1/health/": {
      "get": {
        "tags": [
          "health",
          "健康检查"
        ],
        "summary": "基础健康检查",
        "description": "返回应用的基本健康状态信息，用于快速检测应用是否正常运行。",
        "operationId": "health_check_api_v1_health__get",
        "responses": {
          "200": {
            "description": "应用健康",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                },
                "example": {
                  "status": "healthy",
                  "version": "1.0.0",
                  "timestamp": "2024-01-01T00:00:00Z"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health/detailed": {
      "get": {
        "tags": [
          "health",
          "健康检查"
        ],
        "summary": "详细健康检查",
        "description": "返回更详细的系统状态信息。",
        "operationId": "detailed_health_check_api_v1_health_detailed_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health/ready": {
      "get": {
        "tags": [
          "health",
          "健康检查"
        ],
        "summary": "就绪检查",
        "description": "检查所有依赖服务的连接状态，用于 Kubernetes 就绪探针。\n\n返回各服务的状态：\n- **database**: PostgreSQL 数据库连接状态\n- **redis**: Redis 缓存服务连接状态",
        "operationId": "readiness_check_api_v1_health_ready_get",
        "responses": {
          "200": {
            "description": "所有服务就绪",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "status": "ready",
                  "checks": {
                    "database": {
                      "status": "healthy",
                      "latency_ms": 5.23
                    },
                    "redis": {
                      "status": "healthy",
                      "latency_ms": 1.05
                    }
                  },
                  "version": "1.0.0",
                  "environment": "production",
                  "timestamp": "2024-01-01T00:00:00Z"
                }
              }
            }
          },
          "503": {
            "description": "服务未就绪",
            "content": {
              "application/json": {
                "example": {
                  "status": "not_ready",
                  "checks": {
                    "database": {
                      "status": "unhealthy",
                      "error": "Connection refused"
                    },
                    "redis": {
                      "status": "healthy",
                      "latency_ms": 1.05
                    }
                  },
                  "version": "1.0.0",
                  "environment": "production",
                  "timestamp": "2024-01-01T00:00:00Z"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Root",
        "operationId": "root__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HealthResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "操作是否成功",
            "default": true
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "服务状态",
            "default": "healthy"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "服务版本",
            "default": "1.0.0"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "检查时间戳"
          }
        },
        "type": "object",
        "required": [
          "timestamp"
        ],
        "title": "HealthResponse",
        "description": "健康检查响应"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.sniphunter.com"
    }
  ]
}