Open APIs

 View Only
  • 1.  TMF Version 5: Multiple schemata in allOf tags

    TM Forum Member
    Posted Feb 15, 2023 05:42

    Hi,

    when generating java source  from the V5 yaml, we encountered a problem with multiple schemata in allOf tags: Only the first schema is handled, all following are ignored.

    We found bug 10024 in the Open Api Tools.

    Does anybody have e solution for this problem?

    Thanks a lot,

    Georg



    ------------------------------
    Georg Röver
    1&1 Versatel GmbH
    ------------------------------


  • 2.  RE: TMF Version 5: Multiple schemata in allOf tags

    TM Forum Member
    Posted Feb 20, 2023 10:28

    Which API are you referring to, Georg, or is it a problem you have encountered in all v5 APIs?

    Is this a problem in the specific codegen tool you are using? Perhaps try another tool for code generation?



    ------------------------------
    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 Version 5: Multiple schemata in allOf tags

    TM Forum Member
    Posted Feb 27, 2023 07:10

    Hi Jonathan,

    thanks a lot for your reply!

    We find multiple schemata in allOfs in many V5 APIs, for instance in TMF 622.

    Here is an example from TMF 622:

    AgreementRef:
          type: object
          description: >-
            Agreement reference. An agreement represents a contract or arrangement, either written or
            verbal and sometimes enforceable by law, such as a service level agreement or a customer
            price agreement. An agreement involves a number of other business entities, such as
            products, services, and resources and/or their specifications.
          allOf:
            - $ref: '#/components/schemas/Extensible'
            - $ref: '#/components/schemas/EntityRef'
            - $ref: '#/components/schemas/Reference'
          discriminator:
            propertyName: '@type'
            mapping:
              AgreementRef: '#/components/schemas/AgreementRef'

    We are using Open API Code Generator for Java, version 6.2.1 (see https://github.com/OpenAPITools/openapi-generator). 

    Thanks again!

    Georg



    ------------------------------
    Georg Röver
    1&1 Versatel GmbH
    ------------------------------



  • 4.  RE: TMF Version 5: Multiple schemata in allOf tags

    TM Forum Member
    Posted Feb 28, 2023 16:01

    Thanks for providing the details - I've referred it to the relevant focals in the Open API project.



    ------------------------------
    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 Version 5: Multiple schemata in allOf tags

    TM Forum Member
    Posted Mar 01, 2023 09:08

    Thanks a lot, Jonathan!



    ------------------------------
    Georg Röver
    1&1 Versatel GmbH
    ------------------------------