{
  "openapi": "3.0.3",
  "info": {
    "title": "QA Training API",
    "version": "1.0.0",
    "description": "Test API for QA and BA assignments"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8080"
    }
  ],
  "paths": {
    "/api/request-otp.php": {
      "post": {
        "summary": "Request OTP",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "+70000000001"
                  }
                },
                "required": ["phone"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OTP sent"
          }
        }
      }
    },
    "/api/login-otp.php": {
      "post": {
        "summary": "Login by OTP",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string"
                  },
                  "otp": {
                    "type": "string",
                    "example": "000000"
                  }
                },
                "required": ["phone", "otp"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Logged in"
          },
          "401": {
            "description": "Invalid OTP"
          }
        }
      }
    },
    "/api/profile.php": {
      "get": {
        "summary": "Get profile",
        "responses": {
          "200": {
            "description": "Profile info"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      },
      "post": {
        "summary": "Update profile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved"
          }
        }
      }
    },
    "/api/upload.php": {
      "post": {
        "summary": "Upload file",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": ["file"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Uploaded"
          }
        }
      }
    },
    "/api/admin-stats.php": {
      "get": {
        "summary": "Admin stats",
        "responses": {
          "200": {
            "description": "Statistics"
          }
        }
      }
    }
  }
}
