{
  "openapi": "3.1.0",
  "info": {
    "title": "File Upload URL API",
    "version": "1.0.0",
    "description": "API for generating pre-signed S3 URLs for file uploads"
  },
  "servers": [
    {
      "url": "https://supportupload.atscale.com",
      "description": "AtScale Upload Site"
    }
  ],
  "paths": {
    "/api/getUploadUrl": {
      "post": {
        "summary": "Generate pre-signed upload URL",
        "description": "Generates a pre-signed URL for uploading files to AtScale Support",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string",
                    "description": "Name of the file to be uploaded"
                  }
                },
                "required": [
                  "fileName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully generated upload URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Pre-signed URL for file upload"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Invalid request body - must be valid JSON",
                        "You must specify fileName key in the request JSON body."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Missing authorization token",
                        "Invalid authorization token"
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Failed to generate upload URL"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "JWT token from Frontegg authentication"
      }
    }
  }
}