...
Issues and Decisions
# | Issues | Notes | Decision | |||
---|---|---|---|---|---|---|
1 | Exposing endpoint to clients might be vulnerable. | we can add a flag to enable/disable this feature in docker compose file. | 2 | now we are able to add more than one root nodes. can we update data fragments of more than one root nodes.do we need separate operation for list or can we support all variations using same solution without interface changes | Toine Siebelink Prefer single solution that address all scenarios (multiple containers or list entries) correctly without interface changes. | |
2 | Should all patch operations be part of singel transaction | for now treat individual | ||||
3 | what to do with failures |
|
Initial findings
When trying to perform Patch operation on a list data node, wherein multiple list items are updated in one request. It is seen that only the top most item in the list gets updated where as the remaining list items remain as it is.
...
Code Block | ||
---|---|---|
| ||
{ "status": "400 BAD_REQUEST", "message": "Operation is not supported for multiple data nodes", "details": "Number of data nodes present: 2" } |
Possible Solutions to Updating multiple items
...
By having a new sub end point for Patch operation that specifically performs update on list data nodes
New sub endpoint: PATCH http://{IP}:{PORT}/cps/api/v1/dataspaces/{dataspace-name}/anchor/{anchor-name}/list-nodes?xpath
...
.
- Iterate over top-level element in patch.
- match each top element element to target data
- execute each patch
- Transactional ?!
- test & demo for each scenario
- top level containers
- top level list elements
- list elements under same continaer
...