Persisting a list element to a parent list (ep2) 23/134723/35
authorRudrangi Anupriya <ra00745022@techmahindra.com>
Mon, 17 Jul 2023 14:50:34 +0000 (20:20 +0530)
committerLee Anjella Macabuhay <lee.anjella.macabuhay@est.tech>
Tue, 18 Jul 2023 08:42:26 +0000 (08:42 +0000)
commitad61e283f7d981c3c8e307af871fb3a63e0cf4f9
tree1c7670de106a9f157ec0456df8b7c0a1ef43e328
parentdcf84ad73f0301ef41049e692b9963f6dcac3661
Persisting a list element to a parent list (ep2)

Post List Element does not allow for create List Element, only appends onto existing node as children

-Add a check in saveListElements to see if the parent xpath is a root path ("/").If root node store list element as top node. Else add passed list element to parent xpath node.
-Add test for scenario for above
-Add test scenario Saving list element data fragment under Root node
-Add Integration Tests Add and Delete top-level list (element) data nodes with root node
-Update bookstore model with TopLevelList datanode

Issue-ID: CPS-1586
Change-Id: Iaa7f59fbeebb03703626132c6d5c2afde0e7ab4b
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy
cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java
cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy
cps-service/src/test/resources/bookstore.json
cps-service/src/test/resources/bookstore.yang
integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsDataServiceIntegrationSpec.groovy
integration-test/src/test/resources/data/bookstore/bookstore.yang
integration-test/src/test/resources/data/bookstore/bookstoreData.json