|
25 | 25 | import springfox.documentation.builders.PathSelectors;
|
26 | 26 | import springfox.documentation.builders.RequestHandlerSelectors;
|
27 | 27 | import springfox.documentation.service.ApiInfo;
|
| 28 | +import springfox.documentation.service.Contact; |
28 | 29 | import springfox.documentation.spi.DocumentationType;
|
29 | 30 | import springfox.documentation.spring.web.plugins.Docket;
|
30 | 31 | import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
33 | 34 | @EnableSwagger2
|
34 | 35 | public class SwaggerConfig {
|
35 | 36 |
|
| 37 | + private static final String CONTACT_NAME = "Eiffel Intelligence Maintainers"; |
| 38 | + private static final String CONTACT_URL = "https://github.com/eiffel-community/eiffel-intelligence"; |
| 39 | + private static final String CONTACT_EMAIL = "eiffel-community@googlegroups.com"; |
| 40 | + |
36 | 41 | @Autowired
|
37 | 42 | ParseInstanceInfoEI parseInstanceInfoEI;
|
38 | 43 |
|
39 | 44 | @Bean
|
40 |
| - public Docket productApi() { |
| 45 | + public Docket api() { |
41 | 46 | return new Docket(DocumentationType.SWAGGER_2)
|
42 | 47 | .select()
|
43 | 48 | .apis(RequestHandlerSelectors.basePackage("com.ericsson.ei.controller"))
|
44 | 49 | .paths(PathSelectors.any())
|
45 | 50 | .build()
|
46 | 51 | .apiInfo(metaData());
|
47 | 52 | }
|
48 |
| - @SuppressWarnings("deprecation") |
| 53 | + |
49 | 54 | private ApiInfo metaData() {
|
50 | 55 | ApiInfo apiInfo = new ApiInfo(
|
51 | 56 | "Eiffel Intelligence REST API",
|
52 | 57 | "A real time data aggregation and analysis solution for Eiffel events.",
|
53 | 58 | parseInstanceInfoEI.getVersion(),
|
54 |
| - "Terms of service","", |
| 59 | + "Terms of service", |
| 60 | + new Contact(CONTACT_NAME, CONTACT_URL, CONTACT_EMAIL), |
55 | 61 | "Apache License Version 2.0",
|
56 | 62 | "https://www.apache.org/licenses/LICENSE-2.0");
|
57 | 63 | return apiInfo;
|
|
0 commit comments