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-1586
https://jira.onap.org/browse/CPS-358
Add support for persisting of top level list nodes
Issues & Decisions
# | ISSUES | Description | DECISIONS |
1 |
Persisting list elements as a top level node creates multiple list nodes .
API : POST 'http://localhost:8080/cps/api/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/nodes
creating top level node with multiple list nodes are not persisted appropriately. For example, below is request payload with actual and expected responses.
Code Block | ||||
---|---|---|---|---|
| ||||
{
"bookstores":[
{
"bookstore-name": "Books"
},
{
"bookstore-name": "Stories"
}
]
} |
Code Block | ||||
---|---|---|---|---|
| ||||
[
{
"book-store:bookstores": {
"bookstore-name": "Books"
}
},
{
"book-store:bookstores": {
"bookstore-name": "Stories"
}
}
] |
Code Block | ||||
---|---|---|---|---|
| ||||
"book-store:bookstores": [
{"bookstore-name":"Books"},
{"bookstore-name":"Stores"}
] |
Endpoint
POST 'http://localhost:8080/cps/api/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/list-nodes
...
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
|