summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest')
-rw-r--r--cps-ncmp-rest/pom.xml4
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java13
2 files changed, 7 insertions, 10 deletions
diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml
index e0c4f6fbe1..dbe1af0973 100644
--- a/cps-ncmp-rest/pom.xml
+++ b/cps-ncmp-rest/pom.xml
@@ -68,10 +68,6 @@
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
</dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- </dependency>
<!-- T E S T D E P E N D E N C I E S -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
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 e9e022345f..3d771b6c51 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);