Skip to content

Commit

Permalink
Fix redundant parameters in swagger docs for user apis (#42)
Browse files Browse the repository at this point in the history
* Fixes issue of unwanted parameters in swagger docs

* Update SwaggerConfig.java
  • Loading branch information
krupalshah authored Apr 1, 2021
1 parent e5da5ca commit 446433d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import com.accolite.pru.health.AuthApp.annotation.CurrentUser;

@EnableSwagger2
@Configuration
Expand All @@ -30,6 +31,7 @@ public class SwaggerConfig {
@Bean
public Docket productApi() {
return new Docket(DocumentationType.SWAGGER_2)
.ignoredParameterTypes(CurrentUser.class)
.select()
.apis(RequestHandlerSelectors.basePackage("com.accolite.pru.health.AuthApp"))
.paths(PathSelectors.regex("/api.*"))
Expand Down

0 comments on commit 446433d

Please sign in to comment.