From 9426ae8762a86bda07d99b807718ab2590642b25 Mon Sep 17 00:00:00 2001 From: egernug Date: Wed, 21 Jun 2023 11:16:02 +0100 Subject: 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 Change-Id: I18b8e9ca26d0123009702c2474efbfbeec6d4c44 --- .../ncmp/rest/controller/NetworkCmProxyController.java | 18 +++++++++--------- .../exceptions/NetworkCmProxyRestExceptionHandler.java | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'cps-ncmp-rest/src') 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 patchResourceDataRunningForCmHandle(final String resourceIdentifier, - final String datastoreName, + public ResponseEntity 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 createResourceDataRunningForCmHandle(final String resourceIdentifier, - final String datastoreName, + public ResponseEntity 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 updateResourceDataRunningForCmHandle(final String resourceIdentifier, - final String datastoreName, + public ResponseEntity 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()); -- cgit 1.2.3-korg