Is your feature request related to a problem? Please describe.
I installed the library and configure methods in a @Controller with @Operation. I was confused that some of my @Controller methods get picked and included in OpenAPI model, but others are not.
Later I learned the library is aimed to @RestController. @Controller should be configured through SpringDocUtils.getConfig().addRestControllers to be exposed.
But for version 1.5.2, any method with @ResponseBody in @Controller will be "leaked" to the OpenAPI model even that user does not configure SpringDocUtils.getConfig().addRestControllers.
Describe the solution you'd like
There are two ways.
1. Pick every @Operation in @Controller
Any @Operation should be picked no matter in @RestController or @Controller. Users expect a method get picked if they annotate @Operation on it. I think it makes more sense this way.
The problem is it may break the library's original purpose.
2. Strictly pick methods in @RestController only
this solution is dropped.
It means, any methods in @Controller won't be picked unless explicitly configured SpringDocUtils.getConfig().addRestControllers. Users won't get confused if their entire @Controller is missing from OpenAPI model and will search the document to find how to expose it.
The problem is it may cause compatibility issues.
The solution 1 is preferred. This test set should be passed later after new version released.
Is your feature request related to a problem? Please describe.
I installed the library and configure methods in a
@Controllerwith@Operation. I was confused that some of my@Controllermethods get picked and included in OpenAPI model, but others are not.Later I learned the library is aimed to
@RestController.@Controllershould be configured throughSpringDocUtils.getConfig().addRestControllersto be exposed.But for version 1.5.2, any method with
@ResponseBodyin@Controllerwill be "leaked" to the OpenAPI model even that user does not configureSpringDocUtils.getConfig().addRestControllers.Describe the solution you'd like
There are two ways.
1. Pick every
@Operationin@ControllerAny
@Operationshould be picked no matter in@RestControlleror@Controller. Users expect a method get picked if they annotate@Operationon it. I think it makes more sense this way.The problem is it may break the library's original purpose.
2. Strictly pick methods in@RestControlleronlythis solution is dropped.
It means, any methods in
@Controllerwon't be picked unless explicitly configuredSpringDocUtils.getConfig().addRestControllers. Users won't get confused if their entire@Controlleris missing from OpenAPI model and will search the document to find how to expose it.The problem is it may cause compatibility issues.
The solution 1 is preferred. This test set should be passed later after new version released.