summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2023-09-20 09:35:10 +0000
committerToine Siebelink <toine.siebelink@est.tech>2023-09-20 12:48:19 +0000
commitad9b701a00c237ae8e462de76b500c8612866da6 (patch)
tree5f96ff03f2e4d5f3423c28bdffbfeb7c943cf924 /cps-ncmp-rest
parentbba4d73e53cc79263fc162c4907facf43f13bdbf (diff)
Revert "Migrate CPS to Spring-boot 3.0"
This reverts commit 9693ec51cf6526082f0ad0c3ad208d144cbbb163. Reason for revert: Bug fix delivery Change-Id: I73bdc1528192c662983b0bbef73b10b6d612a719 Signed-off-by: egernug <gerard.nugent@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Diffstat (limited to 'cps-ncmp-rest')
-rw-r--r--cps-ncmp-rest/docs/openapi/components.yaml10
-rw-r--r--cps-ncmp-rest/pom.xml22
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java2
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy2
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy2
5 files changed, 9 insertions, 29 deletions
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml
index be5164375c..243de62102 100644
--- a/cps-ncmp-rest/docs/openapi/components.yaml
+++ b/cps-ncmp-rest/docs/openapi/components.yaml
@@ -223,12 +223,12 @@ components:
state:
$ref: '#/components/schemas/CmHandleCompositeState'
CmHandlePublicProperties:
- type: object
+ type: array
items:
- type: object
- additionalProperties:
- type: string
- example: 'Book Type'
+ type: object
+ additionalProperties:
+ type: string
+ example: Book Type
CmHandleCompositeState:
type: object
properties:
diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml
index edb7ff5e8c..1ac1bd7e6e 100644
--- a/cps-ncmp-rest/pom.xml
+++ b/cps-ncmp-rest/pom.xml
@@ -33,10 +33,6 @@
<artifactId>cps-ncmp-rest</artifactId>
- <properties>
- <minimum-coverage>0.99</minimum-coverage>
- </properties>
-
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -66,10 +62,6 @@
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
- <groupId>io.swagger.core.v3</groupId>
- <artifactId>swagger-models</artifactId>
- </dependency>
- <dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
</dependency>
@@ -106,6 +98,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
@@ -117,14 +110,6 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
- <dependency>
- <groupId>org.openapitools</groupId>
- <artifactId>jackson-databind-nullable</artifactId>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- </dependency>
</dependencies>
<build>
@@ -152,7 +137,6 @@
<sourceFolder>src/gen/java</sourceFolder>
<dateLibrary>java11</dateLibrary>
<interfaceOnly>true</interfaceOnly>
- <useSpringBoot3>true</useSpringBoot3>
<useTags>true</useTags>
<openApiNullable>false</openApiNullable>
<skipDefaultInterface>true</skipDefaultInterface>
@@ -175,7 +159,6 @@
<sourceFolder>src/gen/java</sourceFolder>
<dateLibrary>java11</dateLibrary>
<interfaceOnly>true</interfaceOnly>
- <useSpringBoot3>true</useSpringBoot3>
<useTags>true</useTags>
<openApiNullable>false</openApiNullable>
<skipDefaultInterface>true</skipDefaultInterface>
@@ -190,10 +173,9 @@
<phase>compile</phase>
<configuration>
<inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
- <generatorName>spring</generatorName>
+ <generatorName>openapi-yaml</generatorName>
<configOptions>
<outputFile>openapi-inventory.yaml</outputFile>
- <useSpringBoot3>true</useSpringBoot3>
</configOptions>
</configuration>
</execution>
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
index 87f9d835a1..5d8599a1a2 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
@@ -22,10 +22,10 @@
package org.onap.cps.ncmp.rest.controller;
import io.micrometer.core.annotation.Timed;
-import jakarta.validation.Valid;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
+import javax.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import org.onap.cps.ncmp.api.models.CmHandleQueryServiceParameters;
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy
index 2885ed2325..b11787aa6d 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy
@@ -44,7 +44,7 @@ class NcmpDatastoreRequestHandlerSpec extends Specification {
objectUnderTest.executeRequest('ds', 'ch1', 'resource1', 'options', topic, false)
and: 'wait a little for async execution (only if expected)'
if (expectedCalls > 0) {
- Thread.sleep(500)
+ Thread.sleep(100)
}
then: 'the task is executed in an async fashion or not'
expectedCalls * spiedCpsNcmpTaskExecutor.executeTask(*_)
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy
index b1133a1899..9a09b97973 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy
@@ -26,7 +26,6 @@ import org.onap.cps.ncmp.api.inventory.CompositeStateBuilder
import org.onap.cps.ncmp.api.inventory.LockReasonCategory
import org.onap.cps.ncmp.rest.model.CmHandleCompositeState
import org.onap.cps.ncmp.api.inventory.DataStoreSyncState
-import spock.lang.Ignore
import spock.lang.Specification
import java.time.OffsetDateTime
@@ -60,7 +59,6 @@ class CmHandleStateMapperSpec extends Specification {
assert result.dataSyncState.operational.getSyncState() != null
}
- @Ignore
def 'Handling null state.'() {
expect: 'converting null returns null'
objectUnderTest.toDataStores(null) == null