aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-07-08 15:13:57 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-08 15:13:57 +0000
commitefad912becfc6923414ad3edffa7bad85420a8d4 (patch)
tree8299d4c5a60c2b1ec5e61f0a2bd51096db3d55f1 /ms/blueprintsprocessor/application
parentd13961fbbf4eeaed3f2f70e6d189979d47f6fdb9 (diff)
parent2791db21e7d7f7d31ea402fe978dab216a41367f (diff)
Merge "Fix swagger definition for blueprint processor"
Diffstat (limited to 'ms/blueprintsprocessor/application')
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml1
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java38
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java7
3 files changed, 24 insertions, 22 deletions
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index 0f9e08b5f..f9eead39e 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -32,6 +32,7 @@
<description>Blueprints Processor Application</description>
<dependencies>
+
<dependency>
<groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java
index 8ad3c08f2..4df55ffde 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java
@@ -17,8 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor;
-
+import io.swagger.annotations.Api;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
@@ -27,37 +28,36 @@ import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import java.util.Collections;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebFlux;
/**
* SwaggerConfig
*
* @author Brinda Santh 8/13/2018
*/
-//@Configuration
-//@EnableSwagger2
-@SuppressWarnings("unused")
-@Deprecated
+@Configuration
+@EnableSwagger2WebFlux
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
- .select()
- .apis(RequestHandlerSelectors.any())
- .paths(PathSelectors.any())
- .build()
- .apiInfo(apiInfo());
+ .select()
+ .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
+ .paths(PathSelectors.any())
+ .build()
+ .apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
return new ApiInfo(
- "Blueprints Processor API",
- "Controller blueprints processor API for VNF Selfservice.",
- "1.0.0",
- "Terms of service",
- new Contact("Brinda Santh", "www.onap.com", "bs2796@onap.com"),
- "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());
+ "CDS Blueprints Processor APIs",
+ "Provide APIs to interact with CBA, their related resolved resources and templates.",
+ "0.5.0",
+ null,
+ new Contact("CCSDK Team", "www.onap.org", "onap-discuss@lists.onap.org"),
+ "Apache 2.0",
+ "http://www.apache.org/licenses/LICENSE-2.0",
+ Collections.emptyList());
}
-
-
-}
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java
index b453b8581..32abff011 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java
@@ -27,7 +27,7 @@ import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.ResourceHandlerRegistry;
-import org.springframework.web.reactive.config.WebFluxConfigurationSupport;
+import org.springframework.web.reactive.config.WebFluxConfigurer;
/**
* WebConfig
@@ -35,7 +35,7 @@ import org.springframework.web.reactive.config.WebFluxConfigurationSupport;
* @author Brinda Santh 8/13/2018
*/
@Configuration
-public class WebConfig extends WebFluxConfigurationSupport {
+public class WebConfig implements WebFluxConfigurer {
@Autowired
private AuthenticationManager authenticationManager;
@@ -45,7 +45,8 @@ public class WebConfig extends WebFluxConfigurationSupport {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
- registry.addResourceHandler("swagger-ui.html")
+
+ registry.addResourceHandler("/swagger-ui.html**")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")