300765d4251bc2fed812a03c8cc10aae4ff34b42
[cps.git] / cps-ncmp-rest / src / main / java / org / onap / cps / ncmp / config / NetworkCmProxyConfig.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2021 Pantheon.tech
4  *  Modifications (C) 2021 Nordix Foundation
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.cps.ncmp.config;
23
24 import org.springframework.context.annotation.Bean;
25 import org.springframework.context.annotation.Configuration;
26 import springfox.documentation.builders.PathSelectors;
27 import springfox.documentation.builders.RequestHandlerSelectors;
28 import springfox.documentation.spi.DocumentationType;
29 import springfox.documentation.spring.web.plugins.Docket;
30
31 @Configuration
32 public class NetworkCmProxyConfig {
33
34     /**
35      * Swagger-ui configuration.
36      */
37     @Bean("ncmp-docket")
38     public Docket api() {
39         return new Docket(DocumentationType.OAS_30)
40             .groupName("ncmp-docket")
41             .select()
42             .apis(RequestHandlerSelectors.any())
43             .paths(PathSelectors.any())
44             .build();
45     }
46
47 }