{
  "openapi": "3.0.0",
  "info": {
    "title": "@loopback/example-file-transfer",
    "version": "2.0.0",
    "description": "Example application for file upload/download with LoopBack 4",
    "contact": {
      "name": "IBM Corp."
    }
  },
  "paths": {
    "/files/{filename}": {
      "get": {
        "x-controller-name": "FileDownloadController",
        "x-operation-name": "downloadFile",
        "tags": [
          "FileDownloadController"
        ],
        "responses": {
          "200": {
            "description": "The file content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FileDownloadController.downloadFile"
      }
    },
    "/files": {
      "post": {
        "x-controller-name": "FileUploadController",
        "x-operation-name": "fileUpload",
        "tags": [
          "FileUploadController"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Files and fields"
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Request body for multipart/form-data based file upload",
          "required": true
        },
        "operationId": "FileUploadController.fileUpload"
      },
      "get": {
        "x-controller-name": "FileDownloadController",
        "x-operation-name": "listFiles",
        "tags": [
          "FileDownloadController"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "description": "A list of files"
          }
        },
        "operationId": "FileDownloadController.listFiles"
      }
    }
  },
  "servers": [
    {
      "url": "http://api.techdemos.net"
    }
  ]
}