79296832

Date: 2024-12-20 10:03:30
Score: 0.5
Natty:
Report link

With spring-boot-starter-parent 3.4.0 and springdoc-openapi-starter-webmvc-ui 2.6.0, one solution is to disable generic responses generated by springdoc using the @ControllerAdvice.

You can do this by setting the following property:

springdoc.override-with-generic-response=false

Here is the link to the documentation about this property: springdoc documentation

Where it states:

springdoc.override-with-generic-response | true | Boolean. When true, automatically adds @ControllerAdvice responses to all the generated responses.

Reasons:
  • Blacklisted phrase (1): Here is the link
  • Whitelisted phrase (-1): solution is
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @ControllerAdvice
  • User mentioned (0): @ControllerAdvice
  • Low reputation (0.5):
Posted by: Antonio Berritto