Update INFO.yaml
[appc/cdt.git] / CdtProxyService / src / main / java / org / onap / appc / cdt / service / SwaggerConfig.java
1 /*
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
5 ===================================================================
6
7 Unless otherwise specified, all software contained herein is licensed
8 under the Apache License, Version 2.0 (the License);
9 you may not use this software except in compliance with the License.
10 You may obtain a copy of the License at
11
12     http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19
20 ============LICENSE_END============================================
21 */
22 package org.onap.appc.cdt.service;
23
24 import org.springframework.context.annotation.Bean;
25 import org.springframework.context.annotation.Configuration;
26 import springfox.documentation.builders.ApiInfoBuilder;
27 import springfox.documentation.builders.PathSelectors;
28 import springfox.documentation.builders.RequestHandlerSelectors;
29 import springfox.documentation.service.ApiInfo;
30 import springfox.documentation.spi.DocumentationType;
31 import springfox.documentation.spring.web.plugins.Docket;
32 import springfox.documentation.swagger2.annotations.EnableSwagger2;
33 /**
34  * Created by Amaresh Kumar on 09/May/2018.
35  */
36 @Configuration
37 @EnableSwagger2
38 public class SwaggerConfig {
39     @Bean
40     public Docket api() {
41         return new Docket(DocumentationType.SWAGGER_2)
42                 .apiInfo(getApiInfo())
43                 .select()
44                 .apis(RequestHandlerSelectors.basePackage("org.onap.appc.cdt.service.controller"))
45                 .paths(PathSelectors.any())
46                 .build();
47     }
48
49     private ApiInfo getApiInfo() {
50
51         return new ApiInfoBuilder()
52                 .title("VNF Lifecycle Tetsing Api Doc")
53                 .description("Developer API Reference guide for devlopong VNF lifecylye testing")
54                 .version("1.0.0")
55                 .license("Apache 2.0")
56                 .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0")
57                 .contact("kamaresh@in.ibm.com")
58                 .build();
59     }
60 }