Open APIs

 View Only
  • 1.  TMF667-Document Management API (sending docuemnt content as byte of array)

    Posted Dec 18, 2019 12:08
    ​Hi,

    I am trying to implement TMF667 - Document Management API as part of which I intent to pass the description of the document as a base64 byte of array (the backend system converts the original document in different formats (jpeg, tiff, pdf etc.) to base64 byte of array) .

    In the open API specification there is no attribute defined as byte of array and rather attributes are defined as string.

    Can anyone suggest what should be the approach to send the byte of array.
    Can we define description as byte in attachment object or should we introduce a new attribute under attachment object or is there any other API that can be used?

    Regards,
    Ravi Verma

    ------------------------------
    Ravi Verma
    Infosys
    ------------------------------


  • 2.  RE: TMF667-Document Management API (sending docuemnt content as byte of array)

    TM Forum Member
    Posted Dec 18, 2019 14:10
    Hi Ravi
    In R19 we updated the Attachment resource, which represents the content of a Document, so that it can hold a byte stream. Specifically:
    Attachment.content looks like this in json schemaL
    "content": {
    "type": "string",
    "format": "base64",
    "description": "The actual contents of the attachment object, if embedded, encoded as base64"
    },

    Since we now have a common schema for all APIs, when the Document API will be refreshed, it will use this same definition for the Attachment.

    However, it does seem that we may have an issue with our tooling that generates the swagger, since the format string appears to have been lost. I will raise this problem with our tooling people, but in the meantime I suggest you fix your swagger so that Attachment includes the snippet above.

    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: TMF667-Document Management API (sending docuemnt content as byte of array)

    Posted Dec 19, 2019 03:56
    Thanks a lot Jonathan...
    I will make the changes at my end.

    I suppose unless this change is reflected, the conformance test may not pass after implementing this API on my servers

    ------------------------------
    Ravi Verma
    Infosys
    ------------------------------