Open APIs

 View Only
  • 1.  TMF 632 Patch with JSON Merge Patch

    Posted May 07, 2021 10:04
    Hi,

    How is the implementation for HTTP PATCH via JSON merge patch to be carried for TMF 632,  for arrays, say party characteristic?

    According to RFC 7386 - JSON Merge Patch, JSON merge patch cannot be used to make changes to an element within array, rather the complete array needs to passed on.

    ------------------------------
    Ramkumar M G

    ------------------------------


  • 2.  RE: TMF 632 Patch with JSON Merge Patch

    TM Forum Member
    Posted May 09, 2021 01:39
    Hi Ramkumar
    It is for this reason that there are multiple PATCH semantics. Merge is probably the easiest, but as you note correctly it doesn't do arrays well. For arrays best to use JSON PATCH, as in http://tools.ietf.org/html/rfc6902
    This is covered in the design guidelines for Open APIs, TMF630.
    Hope it helps

    ------------------------------
    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.
    ------------------------------



  • 3.  RE: TMF 632 Patch with JSON Merge Patch

    Posted May 12, 2021 02:11
    Hi Jonathan,

    Thanks. However, as per the tmf document for tmf 632, JSON Merge Patch is mentioned as a mandatory implementation for HTTP Patch, so was curious on how to handle patching of arrays.

    Thanks

    ------------------------------
    Ramkumar M G
    Torry Harris Integration Solutions
    ------------------------------



  • 4.  RE: TMF 632 Patch with JSON Merge Patch

    TM Forum Member
    Posted May 12, 2021 02:55
    I refer you to the design guidelines TMF630 part 5 for handling array updates. Basically merge won't do it, you have to do JSON Patch, with operators working on the relevant array or element within the array. They show examples there.
    Hope it helps

    ------------------------------
    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.
    ------------------------------



  • 5.  RE: TMF 632 Patch with JSON Merge Patch

    Posted May 17, 2021 08:54
    Hi Jonathan,

    Thanks. 

    My other query is though the tmf spec mentions supported Content-Type as application/json, but can this be extended to support application/merge-patch+json?

    ------------------------------
    Ramkumar M G
    Torry Harris Integration Solutions
    ------------------------------



  • 6.  RE: TMF 632 Patch with JSON Merge Patch

    TM Forum Member
    Posted May 18, 2021 01:42
    Hi
    I quote from the design guidelines Part One (TMF630):
    • In case of PATCH if application/json is provided then the default rule will be to apply the same rules as for JSON merge.
    • In case of JSON Patch [RFC6902] for partial updates "application/json-patch+json" media type MUST be used.
    • In case of JSON PATCH Query, "application/json-patch-query+json" media type MUST be used.
    • In case of PATCH as per https://tools.ietf.org/html/rfc7386 "application/merge-patch+json" MUST be used
    Is it clear now?

    ------------------------------
    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.
    ------------------------------



  • 7.  RE: TMF 632 Patch with JSON Merge Patch

    Posted May 18, 2021 01:46
    Hi Jonathan,

    Thanks, clear now

    ------------------------------
    Ramkumar M G
    Torry Harris Integration Solutions
    ------------------------------



  • 8.  RE: TMF 632 Patch with JSON Merge Patch

    Posted Jan 04, 2024 09:56

    Implemented TMF 632 patch with JSON Merge Patch seamlessly, enhancing system efficiency and flexibility. The integration ensures smooth updates to the data model, promoting a more agile and adaptive system. This approach facilitates efficient handling of changes, promoting a streamlined and robust data management process.



    ------------------------------
    russell ra
    TO BE VERIFIED
    ------------------------------



  • 9.  RE: TMF 632 Patch with JSON Merge Patch

    Posted Jan 21, 2024 12:34

    For implementing HTTP PATCH via JSON merge patch for TMF 632, particularly for arrays like party characteristics, ensure your API endpoint supports the PATCH method. Use the JSON merge patch format to update specific fields within the array. Verify that your implementation aligns with TMF 632 specifications, considering the unique requirements for party characteristics.



    ------------------------------
    Emma Gomes
    TO BE VERIFIED
    ------------------------------