summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2023-06-21 11:16:02 +0100
committerToine Siebelink <toine.siebelink@est.tech>2023-06-26 09:01:29 +0000
commit9426ae8762a86bda07d99b807718ab2590642b25 (patch)
tree73c5a82a705e2105c221f652e351c9cb66be2767 /cps-ncmp-rest/src/main
parent0aec08e870c767e345db5c2ac2dc8550dea88cb5 (diff)
Chsnge to OpenApi 3.0
In preparation for the Java 17 and Springboot 3 migrations Swagger Codegen has to upgrade to OpenApi 3.0 This effects cps-rest and cps-ncmp-rest Issue-Id: CPS-1745 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I18b8e9ca26d0123009702c2474efbfbeec6d4c44
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java18
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java6
2 files changed, 12 insertions, 12 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
index 3c22b81ef7..b81378dd20 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
@@ -138,18 +138,18 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
/**
* Patch resource data from passthrough-running.
*
- * @param resourceIdentifier resource identifier
* @param datastoreName name of the datastore
* @param cmHandle cm handle identifier
+ * @param resourceIdentifier resource identifier
* @param requestBody the request body
* @param contentType content type of body
* @return {@code ResponseEntity} response from dmi plugin
*/
@Override
- public ResponseEntity<Object> patchResourceDataRunningForCmHandle(final String resourceIdentifier,
- final String datastoreName,
+ public ResponseEntity<Object> patchResourceDataRunningForCmHandle(final String datastoreName,
final String cmHandle,
+ final String resourceIdentifier,
final Object requestBody,
final String contentType) {
@@ -165,17 +165,17 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
/**
* Create resource data in datastore pass-through running for given cm-handle.
*
- * @param resourceIdentifier resource identifier
* @param datastoreName name of the datastore
* @param cmHandle cm handle identifier
+ * @param resourceIdentifier resource identifier
* @param requestBody the request body
* @param contentType content type of body
* @return {@code ResponseEntity} response from dmi plugin
*/
@Override
- public ResponseEntity<Void> createResourceDataRunningForCmHandle(final String resourceIdentifier,
- final String datastoreName,
+ public ResponseEntity<Void> createResourceDataRunningForCmHandle(final String datastoreName,
final String cmHandle,
+ final String resourceIdentifier,
final Object requestBody,
final String contentType) {
@@ -189,18 +189,18 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
/**
* Update resource data in datastore pass-through running for given cm-handle.
*
- * @param resourceIdentifier resource identifier
* @param datastoreName name of the datastore
* @param cmHandle cm handle identifier
+ * @param resourceIdentifier resource identifier
* @param requestBody the request body
* @param contentType content type of the body
* @return response entity
*/
@Override
- public ResponseEntity<Object> updateResourceDataRunningForCmHandle(final String resourceIdentifier,
- final String datastoreName,
+ public ResponseEntity<Object> updateResourceDataRunningForCmHandle(final String datastoreName,
final String cmHandle,
+ final String resourceIdentifier,
final Object requestBody,
final String contentType) {
validateDataStore(PASSTHROUGH_RUNNING, datastoreName);
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
index f459acec25..fac9489127 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021 Pantheon.tech
- * Modifications Copyright (C) 2021-2022 Nordix Foundation
+ * Modifications Copyright (C) 2021-2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ import org.onap.cps.ncmp.api.impl.exception.ServerNcmpException;
import org.onap.cps.ncmp.rest.controller.NetworkCmProxyController;
import org.onap.cps.ncmp.rest.controller.NetworkCmProxyInventoryController;
import org.onap.cps.ncmp.rest.model.DmiErrorMessage;
-import org.onap.cps.ncmp.rest.model.DmiErrorMessageDmiresponse;
+import org.onap.cps.ncmp.rest.model.DmiErrorMessageDmiResponse;
import org.onap.cps.ncmp.rest.model.ErrorMessage;
import org.onap.cps.spi.exceptions.AlreadyDefinedException;
import org.onap.cps.spi.exceptions.AlreadyDefinedExceptionBatch;
@@ -116,7 +116,7 @@ public class NetworkCmProxyRestExceptionHandler {
final HttpStatus httpStatus,
final HttpClientRequestException httpClientRequestException) {
final var dmiErrorMessage = new DmiErrorMessage();
- final var dmiErrorResponse = new DmiErrorMessageDmiresponse();
+ final var dmiErrorResponse = new DmiErrorMessageDmiResponse();
dmiErrorResponse.setHttpCode(httpClientRequestException.getHttpStatus());
dmiErrorResponse.setBody(httpClientRequestException.getDetails());
dmiErrorMessage.setMessage(httpClientRequestException.getMessage());