-
Couldn't load subscription status.
- Fork 111
Closed
Labels
info: workaround availableA workaround is available for the issueA workaround is available for the issuetype: bugSomething isn't workingSomething isn't working
Description
A controller function returning a StreamedFile does not generate a OpenAPI.yml according to the OpenAPI 3.0 specs. It instead describes the fields etc of the StreamedFile class.
Steps to Reproduce
@Produces("application/pdf")
@Get("/{documentId}")
fun getOne(documentId: UUID): HttpResponse<StreamedFile> {
[...]
Expected Behaviour
The OpenAPI Specs specifies files like this:
/v1/documents/{documentId}:
get:
[...]
default:
description: getOne default response
content:
application/pdf:
schema:
type: string
format: binary
Actual Behaviour
The code above produces this OpenAPI.yml
/v1/documents/{documentId}:
get:
[...]
responses:
default:
description: getOne default response
content:
application/pdf:
schema:
$ref: '#/components/schemas/StreamedFile'
Environment Information
- Micronaut Version: 2.1
- JDK Version: 1.8
morki
Metadata
Metadata
Assignees
Labels
info: workaround availableA workaround is available for the issueA workaround is available for the issuetype: bugSomething isn't workingSomething isn't working