-
Story
-
Resolution: Done
-
Medium
-
None
-
None
Implement the functionality to support multiple nodes addition using data fragment with list-node as a root element.
Data JSON example:
// references test-tree.yang (see cps-service test) { "branch": [ { "name": "one"}, { "name": "two"} ] }
A/C
REST layer (incl openapi update)
- uri:
- (CPS) POST /dataspaces/{dataspaceName}/anchor/{anchorName}/list-node
- (NCMP) POST /cm-handle/{cmHandle}/list-node
- parameters:
- xpath - parent node xpath (mandatory)
- JSON data fragment via request body
- response 201 on success
Service layer
- parse JSON string into collection of DataNode objects
Persistence layer
- find parent node by parent node xpath (throw not found exception if absent)
- add all provided elements to parent node
- persist (throw already exists exception on unique constraint violation)