Open APIs

Expand all | Collapse all

How one needs to validate API request against TMF schema

  • 1.  How one needs to validate API request against TMF schema

    TM Forum Member
    Posted 13 days ago
    Hi,

    I have one question.
    If I am implementing any of the APIs e.g. Trouble Ticket Create API.
    So do I need to validate against TMF schema for Create API.
    Should I be keeping those schema definitions in my application and extend those for extra attributes.
    I am facing challenge in one peculiar case where  depending upon the  'RelateEntity' of a trouble ticket, there could be different set of attributes coming in.
    How does one should validate it.
    Or we should be good doing only business validation rather than schema validation?

    thanks in advance

    ------------------------------
    Anagha Gokhale
    BMC Software, Inc.
    ------------------------------


  • 2.  RE: How one needs to validate API request against TMF schema

    TM Forum Member
    Posted 13 days ago
    Hi Anagha
    To the best of my knowledge, the Open API initiative does not make any assumptions about implementation, specifically we don't give guidance regarding how to validate. So it's up to you in your specific implementation. It might depend on how much you trust your consumers, as against the latency performance penalty for schema validation.
    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: How one needs to validate API request against TMF schema

    TM Forum Member
    Posted 12 days ago
    Edited by Anagha Gokhale 12 days ago
    Hi Jonathan,

    Thanks for your quick reply. It certainly helps.
    One more question is, CTK toolkit for API conformance should succeed if application is not doing schema validation. Would that be a correct assumption?

    thanks
    Anagha

    ------------------------------
    Anagha Gokhale
    BMC Software, Inc.
    ------------------------------



  • 4.  RE: How one needs to validate API request against TMF schema

    TM Forum Member
    Posted 12 days ago
    Hi Anagha
    I guess that by CTM you mean the Conformance Test Kit (CTK) that accompanies each Open API.
    I don't know if the CTK does schema validation, best for @Henrique Rodrigues (the TMF technical focal for CTKs) to address this.​

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