diff options
author | 2021-08-03 18:24:32 +0100 | |
---|---|---|
committer | 2021-08-10 10:44:24 -0400 | |
commit | be21595d53636e2c9b912bfbe8dfdefb81edc70f (patch) | |
tree | c40add4ce147e0ab6da7814384dd42d82e316079 /cps-ncmp-rest/src/main/java/org/onap | |
parent | dce1d58005d90950e00b22078d82559748dcb255 (diff) |
Upgrade Swager Codegen-maven-plugin
- Removed swagger annotations dependency as latest plugin generates
code using v3 annotations.
- updated the method signature as per the new generated code
- removed unnecessary mock springbeans from the WebMvcTest
Issue-ID: CPS-205
Change-Id: Ie7911d7389dca587bde945d913f458de46027e0f
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Diffstat (limited to 'cps-ncmp-rest/src/main/java/org/onap')
-rwxr-xr-x | cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java | 13 |
1 files changed, 7 insertions, 6 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 e9e022345..3d771b6c5 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 @@ -27,6 +27,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.util.Collection; import javax.validation.Valid; +import javax.validation.constraints.NotNull; import org.onap.cps.ncmp.api.NetworkCmProxyDataService; import org.onap.cps.ncmp.api.models.DmiPluginRegistration; import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi; @@ -66,8 +67,8 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { */ @Override @Deprecated(forRemoval = false) - public ResponseEntity<Void> createNode(final String jsonData, final String cmHandle, - final String parentNodeXpath) { + public ResponseEntity<Void> createNode(final String cmHandle, @Valid final String jsonData, + @Valid final String parentNodeXpath) { networkCmProxyDataService.createDataNode(cmHandle, parentNodeXpath, jsonData); return new ResponseEntity<>(HttpStatus.CREATED); } @@ -78,8 +79,8 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { */ @Override @Deprecated(forRemoval = false) - public ResponseEntity<Void> addListNodeElements(final String jsonData, final String parentNodeXpath, - final String cmHandle) { + public ResponseEntity<Void> addListNodeElements(@NotNull @Valid final String parentNodeXpath, + final String cmHandle, @Valid final String jsonData) { networkCmProxyDataService.addListNodeElements(cmHandle, parentNodeXpath, jsonData); return new ResponseEntity<>(HttpStatus.CREATED); } @@ -132,7 +133,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { */ @Override @Deprecated(forRemoval = false) - public ResponseEntity<Object> replaceNode(@Valid final String jsonData, final String cmHandle, + public ResponseEntity<Object> replaceNode(final String cmHandle, @Valid final String jsonData, @Valid final String parentNodeXpath) { networkCmProxyDataService.replaceNodeTree(cmHandle, parentNodeXpath, jsonData); return new ResponseEntity<>(HttpStatus.OK); @@ -144,7 +145,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { */ @Override @Deprecated(forRemoval = false) - public ResponseEntity<Object> updateNodeLeaves(@Valid final String jsonData, final String cmHandle, + public ResponseEntity<Object> updateNodeLeaves(final String cmHandle, @Valid final String jsonData, @Valid final String parentNodeXpath) { networkCmProxyDataService.updateNodeLeaves(cmHandle, parentNodeXpath, jsonData); return new ResponseEntity<>(HttpStatus.OK); |