{
  "openapi": "3.0.3",
  "info": {
    "title": "Developer Portal API",
    "description": "API for the developer portal application",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://your-cloudfront-domain",
      "description": "Production"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check",
        "description": "Returns service health status. Used by ALB for health checking.",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string", "example": "healthy" },
                    "database": { "type": "string", "example": "connected" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/docs": {
      "get": {
        "summary": "API documentation",
        "description": "Returns API documentation metadata and available endpoints",
        "operationId": "getDocs",
        "responses": {
          "200": {
            "description": "API documentation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "openapi": { "type": "string" },
                    "title": { "type": "string" },
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "method": { "type": "string" },
                          "path": { "type": "string" },
                          "description": { "type": "string" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "summary": "Service status",
        "description": "Returns service status, uptime, and database information",
        "operationId": "getStatus",
        "responses": {
          "200": {
            "description": "Service status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "service": { "type": "string" },
                    "status": { "type": "string", "enum": ["operational", "degraded"] },
                    "uptime": { "type": "number" },
                    "database": {
                      "type": "object",
                      "properties": {
                        "status": { "type": "string" },
                        "name": { "type": "string" },
                        "serverTime": { "type": "string", "format": "date-time" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
