Skip to content
Advertisement

How to remove controller list from Swagger UI

I’m using springfox-swagger-ui 2.8.0 which ships with Swagger UI 3.7.0.

I want to get rid of the controller list in front of the api documentation page, pretty useless for me (every tab is empty).

I’ve already tried to annotate the controller class with @ApiIgnore, but of course this removes the rest api documentation as well, which I need.

Basically, I want to remove this:

Controller list to remove/hide

while keeping this:

REST api docs to keep

I digged through online docs, GitHub issues, StackOverflow questions, Google… nothing. Am I the only with this request?

Advertisement

Answer

Add the attribute description to @Api:

For example:

@Api(value = "Test API Controller", produces = MediaType.APPLICATION_JSON_VALUE, tags = {"test-api-controller"}, description = "Testing API") 
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement