Swagger-ui: Can no longer upload file using multipart file upload

Created on 11 May 2020  路  2Comments  路  Source: swagger-api/swagger-ui

Q&A

  • OS: macOS
  • Browser: chrome
  • Version: 81.0.4044.129
  • Method of installation: dist assets
  • Swagger-UI version: 3.25.2
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

Example Swagger/OpenAPI definition:

      "parameters": [
        {
          "name": "multipart-form",
          "in": "formData",
          "description": "One or more CSV files to upload.",
          "required": true,
          "type": "file"
        }
      ]
    }

Describe the bug you're encountering

When you choose a file to upload, the UI mistakenly thinks that there is a validation error and will prevent execution of the request.

To reproduce...

Configure an operation parameter as shown in the JSON above.

Expected behavior

Choosing a file should allow the request to be executed. This problem is not present in Swagger UI version 3.24.3.

Screenshots

upload

try-it-out bug regression

Most helpful comment

@travishaagen Hi Travis, thanks for reporting this issue! This is indeed a regression in the most recent release, and will be fixed in the next release.

All 2 comments

@travishaagen Hi Travis, thanks for reporting this issue! This is indeed a regression in the most recent release, and will be fixed in the next release.

What's the timeline for release?

Was this page helpful?
0 / 5 - 0 ratings