Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Getter
- @Setter
- @Configuration
- @EnableSwagger2
- @ConfigurationProperties(prefix = "myCoach.swagger")
- public class SwaggerConfiguration {
- //...
- private static final String NO_ERROR_REGEX = "(?!.*error).*$";
- //...
- @Bean
- public Docket api() {
- return new Docket(DocumentationType.SWAGGER_2)
- //...
- .paths(paths())
- .build();
- }
- //...
- private Predicate<String> paths() {
- return and(
- regex(NO_ERROR_REGEX)
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement