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
References
https://jira.onap.org/browse/CPS-1586
https://jira.onap.org/browse/CPS-358
Add support for persisting of top level list nodes
Issues & Decisions
ISSUE | NOTES | 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
CpsDataPersistenceServiceImpl.java - addChildrenDataNodes