aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn/src/main/java/org')
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java11
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java12
4 files changed, 24 insertions, 19 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
index 2d41eb4e26..15064e501d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
@@ -46,8 +46,9 @@ import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.core.env.Environment;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
/**
@@ -61,7 +62,7 @@ import io.swagger.annotations.ApiOperation;
* further on executing the process
*/
@Path("/async")
-@Api(value = "/async", description = "Provides asynchronous starting of a bpmn process")
+@OpenAPIDefinition(info = @Info(title = "/async", description = "Provides asynchronous starting of a bpmn process"))
@Provider
@Component
public class WorkflowAsyncResource extends ProcessEngineAwareService {
@@ -97,8 +98,7 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService {
@POST
@Path("/services/{processKey}")
- @ApiOperation(value = "Starts a new process with the appropriate process Key",
- notes = "Aysnc fall outs are only logged")
+ @Operation(description = "Starts a new process with the appropriate process Key. Aysnc fall outs are only logged")
@Produces("application/json")
@Consumes("application/json")
public Response startProcessInstanceByKey(@PathParam("processKey") String processKey, VariableMapImpl variableMap) {
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
index 2eb9d175f2..9547017e64 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -41,8 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
/**
* Generalized REST interface that injects a message event into a waiting BPMN process. Examples:
@@ -53,7 +54,8 @@ import io.swagger.annotations.ApiOperation;
* </pre>
*/
@Path("/")
-@Api(description = "Provides a generic service to inject messages into a waiting BPMN Proccess")
+@OpenAPIDefinition(info = @Info(title = "/",
+ description = "Provides a generic service to inject messages into a waiting BPMN Proccess"))
@Component
public class WorkflowMessageResource {
private static final Logger logger = LoggerFactory.getLogger(WorkflowMessageResource.class);
@@ -64,7 +66,7 @@ public class WorkflowMessageResource {
@POST
@Path("/WorkflowMessage/{messageType}/{correlator}")
- @ApiOperation(value = "Workflow message correlator", notes = "")
+ @Operation(description = "Workflow message correlator")
@Consumes("*/*")
@Produces(MediaType.TEXT_PLAIN)
public Response deliver(@HeaderParam("Content-Type") String contentType,
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
index 731e9d8703..0f2aee7837 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
@@ -55,11 +55,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.stereotype.Component;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
@Path("/workflow")
-@Api(value = "/workflow", description = "Root of workflow services")
+@OpenAPIDefinition(info = @Info(title = "/workflow", description = "Root of workflow services"))
@Component
public class WorkflowResource extends ProcessEngineAwareService {
@@ -83,7 +84,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
*/
@POST
@Path("/services/{processKey}")
- @ApiOperation(value = "Starts a new process with the appropriate process synchronously", notes = "d")
+ @Operation(description = "Starts a new process with the appropriate process synchronously")
@Produces("application/json")
@Consumes("application/json")
public Response startProcessInstanceByKey(@PathParam("processKey") String processKey, VariableMapImpl variableMap) {
@@ -549,7 +550,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
@Path("/services/{processKey}/{processInstanceId}")
@Produces("application/json")
@Consumes("application/json")
- @ApiOperation(value = "Allows for retrieval of the variables for a given process", notes = "")
+ @Operation(description = "Allows for retrieval of the variables for a given process")
public WorkflowResponse getProcessVariables(@PathParam("processKey") String processKey,
@PathParam("processInstanceId") String processInstanceId) {
// TODO filter only set of variables
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
index 03feda6d0f..3923c6ffb6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
@@ -23,12 +23,13 @@
package org.onap.so.bpmn.infrastructure;
import java.util.Arrays;
+import java.util.HashSet;
import javax.xml.ws.Endpoint;
import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.feature.LoggingFeature;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
-import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
+import org.apache.cxf.jaxrs.openapi.OpenApiFeature;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.onap.so.bpmn.common.adapter.sdnc.SDNCCallbackAdapterPortType;
@@ -112,14 +113,15 @@ public class CXFConfiguration {
}
@Bean
- public Swagger2Feature createSwaggerFeature() {
- Swagger2Feature swagger2Feature = new Swagger2Feature();
+ public OpenApiFeature createSwaggerFeature() {
+ OpenApiFeature swagger2Feature = new OpenApiFeature();
swagger2Feature.setPrettyPrint(true);
swagger2Feature.setTitle("SO Orchestration Application");
- swagger2Feature.setContact("The ONAP SO team");
+ swagger2Feature.setContactName("The ONAP SO team");
swagger2Feature.setDescription("This project is the SO Orchestration Engine");
swagger2Feature.setVersion("1.0.0");
- swagger2Feature.setResourcePackage("org.onap.so.bpmn.common.workflow.service");
+ swagger2Feature
+ .setResourcePackages(new HashSet<String>(Arrays.asList("org.onap.so.bpmn.common.workflow.service")));
swagger2Feature.setScan(true);
return swagger2Feature;
}