{
  "openapi": "3.0.0",
  "info": {
    "title": "File Upload API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://localhost:{port}/{basePath}",
      "description": "The location of the local test server.",
      "variables": {
        "port": {
          "default": "3010"
        },
        "basePath": {
          "default": "api"
        }
      }
    }
  ],
  "paths": {
    "/upload": {
      "post": {
        "x-graphql-field-name": "fileUploadTest",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "maxLength": 255,
                    "pattern": "^[0-9a-zA-Z_./ -]*$",
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "id",
                    "url"
                  ],
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 10
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
