Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

#

ISSUES

Description

DECISIONS

1

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. 

Code Block
titlerequest payload
collapsetrue
{
  "bookstores":[
    {
      "bookstore-name": "Books"
    },
    {
      "bookstore-name": "Stories"
    }
  ]
}


Code Block
titleactual datanode
collapsetrue
[
  {
    "book-store:bookstores": {
      "bookstore-name": "Books"
    }
  },
  {
    "book-store:bookstores": {
      "bookstore-name": "Stories"
    }
  }
]


Code Block
titleexpected data node
collapsetrue
"book-store:bookstores": [
    {"bookstore-name":"Books"},
    {"bookstore-name":"Stores"}
]


list is not a container and hence top-level list nodes are stored as collection of data node. it is same behavior for leaf list data node. 

2Adding a list element to a parent root list node does not add element in parent list but in child list element( Add list element API). 

By using add list element(s) API, when added an element to root level list node, data node is added to child node not to parent list node. details are provided 

Jira
serverONAP Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1586


Endpoint 


 POST 'http://localhost:8080/cps/api/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/list-nodes

...