I want to display two REST API endpoints in Swagger ui: /cart and /post.
When I specify either /cart or /post works fine but with both showing me error as
No operations defined in spec!
in swagger-ui
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/cart"))
.paths(PathSelectors.ant("/post"))
.build();
}