View difference between Paste ID: viSvr9Kj and DZLKc8uB
SHOW: | | - or go back to the newest paste.
1
@Getter
2
@Setter
3
@Configuration
4
@EnableSwagger2
5
@ConfigurationProperties(prefix = "myCoach.swagger")
6
public class SwaggerConfiguration {
7
8
	//...
9
10
	private static final String NO_ERROR_REGEX = "(?!.*error).*$";
11
	
12
	//...
13-
                .apiInfo(apiInfo())
13+
14-
                .select()
14+
15-
                .apis(RequestHandlerSelectors.any())
15+
16
        return new Docket(DocumentationType.SWAGGER_2)
17
				//...
18
                .paths(paths())
19
                .build();
20
    }
21
22
	//...
23
24
	private Predicate<String> paths() {
25
        return and(
26
                regex(NO_ERROR_REGEX)
27
        );
28
    }
29
}