I am having a problem similar to the ones described here and here. I have a service which returns a pdf file as attachment with Content-Disposition
header. This works when I call the endpoint from the browser - file is downloaded. On Swagger UI I get a download link after calling the service with response content type application/pdf
, however that link downloads an empty pdf file:
Note that my swagger.json
is generated by Enunciate (version 2.3.0) and the relevant part looks like this:
"responses": {
"200": {
"schema": {
"description": "",
"$ref": "#/definitions/json_File"
}, ...
I tried adding "type": "file"
to this, but it didn't fix the problem. What could be going wrong here?