-
-
Notifications
You must be signed in to change notification settings - Fork 568
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Currently we have springdoc.override-with-generic-response=false to disable generic responses based on ControllerAdvices.
It's also possible to use @hidden in a ControllerAdvice to hide generic responses from all controllers methods.
But, AFAIK, there's no possibility to disable generic responses on a controller endpoint method.
Something like:
@RestController
@RequestMapping("/greeting")
public class ExampleController {
@DisableGenericResponses
@ReponseStastus(OK)
@ApiResponse(responseCode="200")
@GetMapping
public String getGreeting() {
return "Hello World";
}
@ReponseStastus(OK)
@ApiResponse(responseCode="200")
@GetMapping
public String sayHi() {
return "Hi";
}
}
This would be helpful because it would allow to continue using generic responses based on ControllerAdvices and disable those responses on specific endpoints, as needed.
Thank you
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested