swagger-api / swagger-api/swagger-ui
Swagger UI does not download zip file but displaying blob of text
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: Debian 11
- Browser: firefox
- Version: 102.5
- Method of installation: dist assets
- Swagger-UI version: 4.15.5
- Swagger/OpenAPI version: openapi: 3.0.3
Content & configuration
Example Swagger/OpenAPI definition:
# your YAML here
get:
operationId: downloadRunTemplateHandler
tags:
- solution
summary: Download a Run Template step handler zip file
responses:
"200":
description: "CSV zip file"
headers:
Content-Disposition:
schema:
type: string
format: binary
description: csv zip files
example: attachment; filename="name.zip"
content:
application/zip:
schema:
type: string
format: binary
Swagger-UI configuration options:
SwaggerUI({
// your config options here
})
?yourQueryStringConfig
Describe the bug you're encountering
We've an API to download a zip file uisng SpringDoc OpenAPI UI 1.6.13 that pulls swagger-ui 4.15.5.
But instead of downloading the zip file swagger UI displayed blob of text.
To reproduce...
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
download the zip file/ or link to download the zip file
Screenshots

Additional context or thoughts
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SwaggerUI entry point and reproduce the issue with the provided OpenAPI 3.0.3 response, using the dist assets in Firefox. Compare the displayed response with the expected application/zip download behavior. Done means the zip response is offered as a downloadable file rather than displayed as text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100