Skip to content

Conversation

@Mattias-Sehlstedt
Copy link
Contributor

Fixes #3137

The issue reported stem from the fact the the useReturnTypeSchema currently is considered on a method level rather than on an http code level. This means that if several @ApiResponse are defined, then the last annotation determines whether the useReturnTypeSchema is triggered or not. This will then in turn lead to either all responses calculating the response type or none or them.

This change allows the definition to be tied to individual http code definitions, so that for example only the 200 response derives its response type, while any 4xx or 5xx definition can retain strictly an explicit schema implementation.

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

Successfully merging this pull request may close these issues.

Argument useReturnTypeSchema=true is ignored when multiple @ApiResponse are defined

1 participant