Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger UI does not download zip file but displaying blob of text #8319

Open
mahkoCosmo opened this issue Dec 15, 2022 · 0 comments
Open

Swagger UI does not download zip file but displaying blob of text #8319

mahkoCosmo opened this issue Dec 15, 2022 · 0 comments

Comments

@mahkoCosmo
Copy link

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

download the zip file/ or link to download the zip file

Screenshots

image

Additional context or thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant