TM Forum Community

 View Only
  • 1.  Extension Pattern in TMF

    Posted 2 hours ago

    Hi all,

    TMF630 Part 2 says allOf should be used to extend objects, and base collection operations can create/return concrete subtypes using @type.  And hence if we need to add new optional fields to the standard TMF object, it has to be extended.

    Using TMF630 extension pattern (allOf + @type), if I extend Agreement to AgreementExtended and also extend nested child objects such as PartyRef to PartyRefExtended ,what is the recommended request/response pattern?

     
    Example:

    • root payload has @type = AgreementExtended
    • child payload needs to have @type = PartyRefExtended

    Questions:

    1. Is this the recommended TMF modeling pattern for extending both root and child objects?
    2. Should request/response schemas still reference the base object and rely on runtime @type?
    3. Or should endpoint schemas explicitly expose base + extended variants  using oneOf  at endoint level?
    4. For nested objects, should the child return its extended @type when extra fields are present?

    Would appreciate any examples from TMF APIs or implementation guidance.

    #General

    ------------------------------
    Bhavik Parekh
    Infosys
    ------------------------------