summaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn
diff options
context:
space:
mode:
authorBOSLET, CORY <cory.boslet@att.com>2021-03-09 22:57:29 -0500
committerAT&T Open Source <g22940@att.com>2021-03-09 22:57:29 -0500
commit8aca451301378942e4c942be202d0bfd2313af93 (patch)
treeaf06b25e1120b1f01c6ec5661efa8c9b4648e930 /bpmn/mso-infrastructure-bpmn
parent1d316a3c50f978313eca360c1a1636de68afee9d (diff)
version upgrades plus cleanup
Removed over 125 dependencies and added to dependency management Added in a few dependencies and removed some Change the swagger version to so pom Removed version property reference in the pom Added in missing dependency for bpmn blocks Added in missing dependecy for common bpmn Updated the camunda-bpm-assert to use a version that is compatible with assertj-core 3.11. The camunda-bpm-assert namespace group also changed. This fixes the no method found error. Updated unit test to account for class name change Updated the unit test to account for lib change Fixed unit test for software upgrade stuff Exclude older versions of javassist to fix null pointer caused by incompatible javassist version with hibernate and bowman Added in missing dependency for task test Added missing dependency and fixed formatting Remove files that got added back in by merge conflict Use the new namespace for the swagger annotations Need to exclude swagger annoatations from the old namespace Updated to fix compilation error due to use of legacy swagger and cxf swagger Use the swagger v3 plugin for gen resources Use the openapi v3 swagger in all bpmn packages Fix null pointer to create the OpenApiFeature in cxf Issue-ID: SO-3578 Signed-off-by: AT&T Open Source <g22940@att.com> Change-Id: I7093376b2d8271e9c5b911b901133e01b957da84
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn')
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml14
-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
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java2
6 files changed, 26 insertions, 33 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index 1df4a26246..aa76782aef 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -138,7 +138,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>${springboot.version}</version>
<configuration>
<mainClass>org.onap.so.bpmn.infrastructure.MSOInfrastructureApplication</mainClass>
</configuration>
@@ -201,13 +200,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-bom</artifactId>
- <version>${camunda.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
@@ -275,13 +267,11 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
- <version>1.2.4.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -299,15 +289,13 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.camunda.bpm.extension</groupId>
+ <groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
- <version>2.0-alpha2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
- <version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
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;
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
index 91cfa93a34..0c001b1192 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
@@ -22,7 +22,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import java.util.HashMap;