{
  "openapi": "3.0.3",
  "info": {
    "title": "Zohaib InMotion API",
    "description": "Public API for Zohaib's portfolio. Allows retrieving project data and contact information. Versioning is provided in the URL path (/v1/).",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://zohaib-inmotion.web.app"
    }
  ],
  "paths": {
    "/api/v1/health.json": {
      "get": {
        "operationId": "getHealthStatus",
        "summary": "Health check endpoint",
        "description": "Returns the health status of the API, used by agents to verify the API is reachable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Health status of the API",
                      "example": "ok"
                    },
                    "version": {
                      "type": "string",
                      "description": "Version string of the API",
                      "example": "1.0.0"
                    }
                  },
                  "required": ["status", "version"]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects.json": {
      "get": {
        "operationId": "getProjects",
        "summary": "Get all projects",
        "description": "Retrieves a list of all featured concept studies and projects in the portfolio.",
        "responses": {
          "200": {
            "description": "A list of projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the project"
          },
          "title": {
            "type": "string",
            "description": "The title of the project"
          },
          "category": {
            "type": "string",
            "description": "The category the project belongs to"
          }
        },
        "required": ["id", "title", "category"]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "description": "HTTP status code",
                "example": 404
              },
              "message": {
                "type": "string",
                "description": "Error message",
                "example": "Resource not found"
              },
              "resolution": {
                "type": "string",
                "description": "Suggested resolution for the error",
                "example": "Check the API documentation for valid endpoints."
              }
            },
            "required": ["code", "message"]
          }
        },
        "required": ["error"]
      }
    }
  }
}