aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-06-23 15:30:36 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-07-04 15:53:42 -0400
commit2791db21e7d7f7d31ea402fe978dab216a41367f (patch)
treef73d5a97b77f6eb17f18fb93465870b8b341219e /ms/blueprintsprocessor/application/src
parentc5276ff19122435871c3deedbf0d983962ac2537 (diff)
Fix swagger definition for blueprint processor
Change-Id: I69ba541b4b301735a988cf01673827a79daf1f8c Issue-ID: CCSDK-1431 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/application/src')
-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
2 files changed, 23 insertions, 22 deletions
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/**")