We are bringing support for persisting of top level list nodes. Here mainly it covers two issues, they are
- Persisting list elements as a top level node creates multiple list nodes for every entry rather than a singular list node with the entries
- Persisting a list element to a parent list
...
https://jira.onap.org/browse/CPS-1586https://jira.onap.org/browse/CPS-358
Add support for persisting of top level list nodes
Issues & Decisions
# | ISSUES |
Description | DECISIONS |
Persisting list elements as a top level node creates multiple list nodes (dec-0)
Persisting a list element to a parent list (dec-1)
The DataNodeBuilder currently assumes the incoming data always describes single data node. As result the single DataNode object is always created even if input data contains multiple entries
Endpoint
POST 'http://localhost:8080/cps/api/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/nodes
POST 'http://localhost:8080/cps/api/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/list-nodes
Required code Changes
CpsDataServiceImpl.java – buildDataNodes
...
1 | Adding a list element to a root list node does not | By using add list element(s) API, when added an element
| For top level list nodes when new elements are added to root list nodes,
Service Layer
Persistence Layer
Integration Tests
|