We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When produces is not defined at a Controller method level, the Controller class level one is used instead.
produces
Say
@RequestMapping(value = "/api/v1/addresses", produces = APPLICATION_JSON_VALUE) @RestController public class AddressResource { @GetMapping public AddressDto getAddress(@PathVariable String id) { ...
I would expect Spring to produce json for this method.
However, Springdoc has, instead of inherited the parent, it has merged class and method (choosing a default for the method - MediaTypes.ALL).
Resulting in
content": { "*/*": { "schema": { "$ref": "#/components/schemas/AddressDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AddressDto" } } }
To Reproduce Steps to reproduce the behavior:
What version of spring-boot you are using? 2.2.4-RELEASE
What modules and versions of springdoc-openapi are you using? 1.2.30, no additional modules (ui, common, webmvccore)
Expected behavior I would expect only json as a result, not ALL + json.
The text was updated successfully, but these errors were encountered:
a9e5672
Hi @dominic-jones,
The fix will be available on v1.2.31.
Sorry, something went wrong.
Excellent, thank you for the speedy fix! It is working as I expect here.
No branches or pull requests
Describe the bug
When
produces
is not defined at a Controller method level, the Controller class level one is used instead.Say
I would expect Spring to produce json for this method.
However, Springdoc has, instead of inherited the parent, it has merged class and method (choosing a default for the method - MediaTypes.ALL).
Resulting in
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
2.2.4-RELEASE
What modules and versions of springdoc-openapi are you using?
1.2.30, no additional modules (ui, common, webmvccore)
Expected behavior
I would expect only json as a result, not ALL + json.
The text was updated successfully, but these errors were encountered: