question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for file download

See original GitHub issue

#swagger-ui 3.0 does not generate a download link for files.

  • swagger-ui: 3.0
  • swagger file:
{
  "swagger" : "2.0",
  "info" : {
    "description" : "descr",
    "version" : "0.1",
    "title" : "title"
  },
  "host" : "SM05720",
  "basePath" : "/",
  "schemes" : [ "https" ],
  "paths" : {
    "/test/download" : {
      "get" : {
        "tags" : [ "download" ],
        "description" : "this is to test the download",
        "operationId" : "download XYZ",
        "produces" : [ "application/msexcel" ],
        "parameters" : [ ],
        "responses" : {
          "200" : {
            "description" : "success - download the file",
            "schema" : {
              "type" : "file"
            }
          }
        }
      }
    }
  }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:27 (15 by maintainers)

github_iconTop GitHub Comments

5reactions
hkosovacommented, May 31, 2017

@webron, try this:

swagger: "2.0"
info:
  title: test
  version: "1.0"
    
host: raw.githubusercontent.com
schemes: [https]

paths:
  /mozilla/pdf.js/master/examples/helloworld/helloworld.pdf:
    get:
      produces:
        - application/pdf
      responses:
        '200':
          description: OK
          schema:
            type: file

Swagger UI 2.2.10: download-file

0reactions
lock[bot]commented, Jul 1, 2019

Locking due to inactivity. This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content. If you think you’re experiencing something similar to what you’ve found here: please open a new issue, follow the template, and reference this issue in your report. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to obtain Microsoft support files from online services
Describes how to download support files from online services. Step-by-step instructions are provided.
Read more >
Download a file - Android - Google Chrome Help
On your Android phone or tablet, open the Chrome app Chrome . Go to the webpage where you want to download a file....
Read more >
Supported download file types - Canva Help Center
Supported download file types. Download your designs in the file format that best serves their intended use: Image. JPG. Small file ...
Read more >
How can I download files? | Frame.io Customer Support
Downloading files from a project. ... To download a single file, select the three dots ... on a clip > Download > download...
Read more >
Download files from the web - Code42 Support
Web restore is designed to download a few files when you need them on the go. It is not designed for very large...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found