My API can return either JSON or compressed files. I set the following top-level producesspec:
produces:
- application/json
- application/x-gzip
However, when on one of my endpoints I specify the following:
responses:
"200":
description: Success
schema:
type: file
I get the following Swagger Error: Validation error: enum, with an error path pointing to the type: file above.
The specs are not entirely clear to me as to how I should format an endpoint that returns a compressed file, but the above was the result of my understanding. Is this a bug or was my understanding incorrect? If the latter, could someone enlighten me?