Versions Compared

Key

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

...

  • A new endpoint to validate the JSON payload against an existing schema in CPS DB, this endpoint will only validate the data and never persist it.
  • A dry-run flag in the existing CPS API's which would validate the data and return a response containing the details of validation failure. This flag can be implemented to multiple CPS APIs such as POST (Create a Node), PATCH (Update a Node) and PUT (Replace a node), where we can validate the entire data or parts of data and return the exact point of failure in the validation as part of response.

Implementation Ideas

In either case the endpoint should return a REST response with appropriate code and message. 

  • Response Code: 400
  • Response Body: a JSON response providing details about the failure. (response body format to be finalized)

References:

...