Home » Java » java – Is there a way to show endpoint present in my maven dependencies in swagger-ui-Exceptionshub

java – Is there a way to show endpoint present in my maven dependencies in swagger-ui-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I am trying to list all the endpoints in my application including some of the endpoints present in the dependent libraries using Swagger. Is there any way to do so?

How to&Answers:

Swagger automatically fetch all the endpoints according to configuration. You have to mention the base url:

return new Docket(DocumentationType.SWAGGER_2)
            .select()
            .paths(PathSelectors.ant("/admin/**"))
            .build()
            .useDefaultResponseMessages(false);