-
Notifications
You must be signed in to change notification settings - Fork 1.5k
@Api(hidden = true) does not hide controller operations #2437
New issue
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
Comments
After digging a bit it appears that it works if I put a Thanks :) |
Thanks for reporting. Will add this to the list of features |
better use @ApiIgnore in controller level. |
Seems related to #1731, which was marked as closed. I can confirm as well the same functionality expectation is failing for us, but using |
@ApiIgnore very good |
@ApiIgnore shows the entry of Controller. How to completely hide this? |
@javaHelper you can add "/test/" to @RequestMapping of controller |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue. |
@ApiIgnore shows the entry of Controller @Deprecated
@RestController
@RequestMapping("/test/test-rest")
@Api(tags = "testRest", description = "test rest test rest", hidden = true)
@ApiIgnore
public class TestRest {
.....
} |
@MVTalent What version are you using. This totally works, infact its used internally as well. |
checked on versions 2.8.0 and 2.9.2 |
Not sure, it should work with 2.9.2 |
It does not work with 3.0.0. |
Hide controller or method? Please use @ApiIgnore for that controller or method... Thanks |
Using springfox-swagger2:2.8.0 and springfox-swagger-ui:2.8.0 (same issue with 2.9.0):
When I set the
hidden=true
property on the@Api
annotation, the controller and all its endpoints are still appearing on swagger-uiIf I specifically set the hidden property directly on the
@ApiOperation
, it works correctly. But sometimes I want to hide all the endpoints of a controller. For now, I need to add a hidden=true on all the@ApiOperation
of the controller, and that can be boilerplate.The
hidden=true
property on the@Api
annotation was working on old versions of springfox, like the 2.3.0 I think, so it might be a regression.Thanks !
The text was updated successfully, but these errors were encountered: