diff options
author | egernug <gerard.nugent@est.tech> | 2023-06-28 10:57:53 +0100 |
---|---|---|
committer | egernug <gerard.nugent@est.tech> | 2023-06-28 11:04:55 +0100 |
commit | 1118bedbd3981c12aebcb9fa99e8744a9bf413c3 (patch) | |
tree | 0bd34820025354f5a889c8a0c4c974e893cd61b6 /src/main/java/org | |
parent | c29b13979fb184524bfcbc38abd76cf453415364 (diff) |
Change to OpenAPI 3.0
In preparation for Java 17 migration Swagger codegen needs to be replaced by OpenaAPI 3.0
Issue-ID: CPS-1745
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I46be8bafad5b5ccff055221e4f3c60b7ec422a70
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java | 17 | ||||
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java | 6 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java b/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java index b0ee4cf0..2ed1ebd3 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java @@ -32,10 +32,10 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.onap.cps.ncmp.dmi.model.CmHandles; import org.onap.cps.ncmp.dmi.model.DataAccessRequest; -import org.onap.cps.ncmp.dmi.model.DataOperationRequest; import org.onap.cps.ncmp.dmi.model.ModuleReferencesRequest; import org.onap.cps.ncmp.dmi.model.ModuleResourcesReadRequest; import org.onap.cps.ncmp.dmi.model.ModuleSet; +import org.onap.cps.ncmp.dmi.model.ResourceDataOperationRequests; import org.onap.cps.ncmp.dmi.model.YangResources; import org.onap.cps.ncmp.dmi.notifications.async.AsyncTaskExecutor; import org.onap.cps.ncmp.dmi.rest.api.DmiPluginApi; @@ -80,6 +80,7 @@ public class DmiRestController implements DmiPluginApi, DmiPluginInternalApi { return ResponseEntity.ok(moduleSet); } + @Override public ResponseEntity<YangResources> retrieveModuleResources( final String cmHandle, @@ -107,14 +108,14 @@ public class DmiRestController implements DmiPluginApi, DmiPluginInternalApi { /** * This method is not implemented for ONAP DMI plugin. * - * @param requestId requestId generated by NCMP as an ack for client * @param topic client given topic name - * @param dataOperationRequests list of operation details + * @param requestId requestId generated by NCMP as an ack for client + * @param resourceDataOperationRequests list of operation details * @return (@ code ResponseEntity) response entity */ @Override - public ResponseEntity<Void> getResourceDataForCmHandleDataOperation(final String requestId, final String topic, - final List<DataOperationRequest> dataOperationRequests) { + public ResponseEntity<Void> getResourceDataForCmHandleDataOperation(final String topic, final String requestId, + final ResourceDataOperationRequests resourceDataOperationRequests) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -123,18 +124,18 @@ public class DmiRestController implements DmiPluginApi, DmiPluginInternalApi { * It filters the response on the basis of options query parameters and returns response. Passthrough Running * supports both read and write operation whereas passthrough operational does not support write operations. * - * @param resourceIdentifier resource identifier to fetch data * @param datastoreName name of the datastore * @param cmHandle cm handle identifier + * @param resourceIdentifier resource identifier to fetch data * @param optionsParamInQuery options query parameter * @param topicParamInQuery topic name for (triggering) async responses * @param dataAccessRequest data Access Request * @return {@code ResponseEntity} response entity */ @Override - public ResponseEntity<Object> dataAccessPassthrough(final String resourceIdentifier, - final String datastoreName, + public ResponseEntity<Object> dataAccessPassthrough(final String datastoreName, final String cmHandle, + final String resourceIdentifier, final String optionsParamInQuery, final String topicParamInQuery, final DataAccessRequest dataAccessRequest) { diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java index 753d16f7..a9a13a38 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java @@ -38,7 +38,7 @@ import org.onap.cps.ncmp.dmi.exception.ModuleResourceNotFoundException; import org.onap.cps.ncmp.dmi.exception.ModulesNotFoundException; import org.onap.cps.ncmp.dmi.model.DataAccessRequest; import org.onap.cps.ncmp.dmi.model.ModuleSet; -import org.onap.cps.ncmp.dmi.model.ModuleSetSchemas; +import org.onap.cps.ncmp.dmi.model.ModuleSetSchemasInner; import org.onap.cps.ncmp.dmi.model.YangResource; import org.onap.cps.ncmp.dmi.model.YangResources; import org.onap.cps.ncmp.dmi.service.client.NcmpRestClient; @@ -137,8 +137,8 @@ public class DmiServiceImpl implements DmiService { } } - private ModuleSetSchemas toModuleSetSchemas(final ModuleSchema moduleSchema) { - final ModuleSetSchemas moduleSetSchemas = new ModuleSetSchemas(); + private ModuleSetSchemasInner toModuleSetSchemas(final ModuleSchema moduleSchema) { + final ModuleSetSchemasInner moduleSetSchemas = new ModuleSetSchemasInner(); moduleSetSchemas.setModuleName(moduleSchema.getIdentifier()); moduleSetSchemas.setNamespace(moduleSchema.getNamespace()); moduleSetSchemas.setRevision(moduleSchema.getVersion()); |