Versions Compared

Key

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

...

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
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"}
]







Endpoint 


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

...