Hi Sergei
In principle we should support both types of Patch, the operation-based variation
https://tools.ietf.org/html/rfc6902 and the merge that you mention
https://tools.ietf.org/html/rfc7386 .
But I suspect that most of the examples in our API user guides use the merge syntax since it's easier to create those examples - I know that's what I did in the APIs that I did examples for.
And arrays would presumably need to be modified only by operation-based patch.
It should be covered in the TMF630 design guidelines,
@Alexis De Peufeilhoux .
It's possible that you have encountered an error in the specific example, adding
@Ludovic Robert for comment.
Thanks for bringing this to our attention.
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
------------------------------
Original Message:
Sent: Jul 14, 2020 11:04
From: Sergei Fedorov
Subject: JSON Merge Patch format in PATCH method
Hi,
I have a question regarding TMF641 Service Ordering API User Guide v4.0.0. In Patch service order section the document requires support of json/merge format. Below in Usage Samples partial update of "orderItem" array is shown.
But according to JSON Merge Patch specification (https://tools.ietf.org/html/rfc7396) partial update of an array is not possible: "There are a few things to note about the function. If the patch is anything other than an object, the result will always be to replace the entire target with the entire patch. Also, it is not possible to patch part of a target that is not an object, such as to replace just some of the values in an array."
Could you please explain how arrays should be handled for JSON Merge Patch format in HTTP PATCH method?
------------------------------
Sergei Fedorov
T-Systems International Services GmbH
------------------------------