I am using spring-boot-starter-parent 1.3.3.RELEASE. I am unable to disable repository controller in Swagger UI

I have disabled the other unwanted endpoints using this link.
How to disable repository-controller from swagger UI?? kindly provide your inputs
If use the follow, it returns only the search repository which written by me but I need the entity endpoints also. Those entities endpoints will return by spring defaults.
.apis(RequestHandlerSelectors.basePackage("bla.blablah.bla"))
Kindly refer the image: 
When initializing your Docket in your Application class, you can filter package names easily, therefore it will create your api for only given base package:
@Bean
public Docket swaggerSpringMvcPlugin(){
return new Docket( DocumentationType.SWAGGER_2 )//
.select().apis( RequestHandlerSelectors.basePackage( "com.blabla.bla" ) )//
.build();
}
Another solution:
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
.apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.boot")))
.build();
Another solution that negates a specific package:
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
.apis(RequestHandlerSelectors.basePackage("org.springframework.boot").negate())
.build();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With