You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

We are bringing support for persisting of top level list nodes. Here mainly it covers two issues, they are

  1. Persisting list elements as a top level node creates multiple list nodes for every entry rather than a singular list node with the entries
  2. 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

#

ISSUES

Description

DECISIONS


Persisting list elements as a top level node creates multiple list nodes 

 

 


creating top level node with multiple list nodes are not persisted appropriately. For example, below is request payload with actual and expected responses. 

request payload
{
  "bookstores":[
    {
      "bookstore-name": "Books"
    },
    {
      "bookstore-name": "Stories"
    }
  ]
}
actual datanode
[
  {
    "book-store:bookstores": {
      "bookstore-name": "Books"
    }
  },
  {
    "book-store:bookstores": {
      "bookstore-name": "Stories"
    }
  }
]
expected data node
"book-store:bookstores": [
    {"bookstore-name":"Books"},
    {"bookstore-name":"Stores"}
]






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








  • No labels