Versions Compared

Key

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

...

Based on the above outcome, another test to update individual data trees was preformed, and it was found that when a specific data tree is being updated using its specific xPath none of the data trees get updated and a 400 BAD REQUEST is received.

Issues & Decisions:

NotesDecisions

 

As per discussion with stakeholder (DT), the following decisions were made:

  • Support for update operation across data trees is not of high priority.
  • But the error code returned when trying to update. multiple data trees should be made specific.
  • Team decision is to be taken regarding the new/updated error response.

 

After discussion in the CPS-sub team, following conclusions were made:

  • Use correct Error Code and Response Message, when updating multiple data nodes
  • As per CPS Exceptions and REST APIs HTTP Response Codes, the response code was set to 400 with appropriate message.
  • Update for single data node with root node xpath remains as it is.

JSON Data Stored in CPS DB using POST operation.

...

Code Block
[
  {
    "multiple-data-tree:last-container": {
      "x-leaf": "x-new-value"
    }
  },
  {
    "multiple-data-tree:first-container": {
      "a-leaf": "a-value"
    }
  }
]

The same behaviour is seen in the first scenario above, where if the leaves are updated and the list is left as it is. Then only the leaf node of second data tree gets updated.

When updating list node with xpath set as root node xpath "/", returns Status 200 but data is not updated

(Note: This following finding was identified as an issue with list-nodes and not multiple data nodes. It is documented separately CPS-1383: Investigate CPS-Path for modifications of multiple fragments under an anchor.)

Assuming the following data is in the databse

...