Open APIs

 View Only
  • 1.  Individual Schema Definition Files for Models used in Open API Schema Definition

    TM Forum Member
    Posted 26 days ago

    Hi,

    I am looking for individual schema definition files for Models used in Open API schema definition. Example: Schema definition files for ProductOffering, ProductSpecification....used in open API TMF620 ProductCatalogManagement.

    Regards

    Ashish Kumar



    ------------------------------
    Ashish Kumar
    Jio Platforms Limited
    ------------------------------


  • 2.  RE: Individual Schema Definition Files for Models used in Open API Schema Definition

    TM Forum Member
    Posted 26 days ago

    Hello Ashish,

    I hope TMF632 Party Management can be used  for defining  model individual.



    ------------------------------
    Ragavi Ramasamy
    Halleyx Inc.
    ------------------------------



  • 3.  RE: Individual Schema Definition Files for Models used in Open API Schema Definition

    TM Forum Member
    Posted 25 days ago

    Hi Ashish and all

    Currently, I am not aware of plans by TMF to publish the individual schema files as a separate asset. It's been discussed several times in the past, but not executed.

    However since you have the Swagger/OAS files for each API, it's not a big deal to extract individual schemas if you need them.



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



  • 4.  RE: Individual Schema Definition Files for Models used in Open API Schema Definition

    TM Forum Member
    Posted 21 days ago

    Thanks, Jonathan, for reply!

    I tried to extract individual schemas from Swagger file but not able to achieve, maybe I am missing something basic.   

    Any guidance will be very helpful.

    Regards

    Ashish Kumar



    ------------------------------
    Ashish Kumar
    Jio Platforms Limited
    ------------------------------



  • 5.  RE: Individual Schema Definition Files for Models used in Open API Schema Definition

    TM Forum Member
    Posted 21 days ago

    In the published Swagger files for v4 you will find all the schemas under the "definitions" section. Be aware that the schemas in the swagger files are expanded, so that (for example)  "allOf" directives have been replaced by the actual contents of the referred schema. 

    For example, from TMF666 Account:

        "definitions": {
            "Account": {
                "type": "object",
                "description": "Generic Account structure used to define commonalities between sub concepts of PartyAccount and Financial Account.",
                "required": [
                    "name"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier of the account"
                    },
     

    And similarly for v5 APIs, you will find the schemas in the components: schemas: section of OAS file. In v5 the schemas are not fully expanded, so you'll see "allOf" and "oneOf" references to other schemas in the file. And in v5 the OAS file is in yaml rather than json.

    components:
      schemas:
        Account:
          allOf:
            - $ref: '#/components/schemas/Entity'
            - type: object
              description: >-
                Generic Account structure used to define commonalities between sub concepts of
                PartyAccount and Financial Account, or other type of account supported by the API.
              properties:
                creditLimit:
                  $ref: '#/components/schemas/Money'
                description:
                  type: string
                  description: Detailed description of the account



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