Open APIs

 View Only
  • 1.  TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 21, 2020 23:06

    Hi TMF community,

    In reference to TMF664, v4.1 branch in Open API Data Model git repository, I have two questions:

    1) According to the UML resource model, the root object, resourceFunction can have zero to many relationships with ResourceRefOrValue. Additionally it shows resourceSpecification, resourceCharacteristic and activationFeature objects to be referenced by the ResourceRefOrValue object. Please see attachment uml-resource-model.

    However, in the ResourceFunction.example.json, the resourceSpecification,  resourceCharacteristic and activationFeature objects are beneath the resourceFunction object. Please see attachment resourcefunction-example (from v4 API user guide).

    Could the forum please provide clarity on this discrepancy?

    2) The UML resource model does not show any association between ResourceFunction and ResourceFunctionSpecification? Is this intentional or missing - please clarify?

    Thanks,

    Anu



    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------


  • 2.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 22, 2020 00:15

    @Vance Shipley - Hi Vance, thought I'd tag you in this thread. Appreciate your response. Anu



    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------



  • 3.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 22, 2020 03:19

    In  @Anu Aulakh's question 1) I guess you are asking about the UML diagram in the TMF664 User Guide. It does seem a bit confusing.  The UML diagrams are automatically created by our tooling from the Swagger (OAS) which is in turn created from our JSON schemas.  The attributes you mention are inherited from Resource and apply equally to ResourceFunction.  I assume the tooling has cut some redundant relationships to make the result reasonable to read. 

    The examples in TMF664 are correct.  IMHO the diagrams should be considered as a visual aid to navigation with the schemas / OAS as the normative reference.

    As far as question 2) goes it is the same thing.  the examples correctly show the relationship:

    "resourceSpecification": {
        "id": "5fc91de8-88be-4c7c-8b3c-e08ccc53b889",
        "href": "/resourceCatalog/v4/resourceSpecification/5fc91de8-88be-4c7c-8b3c-e08ccc53b889",
        "@type": "ResourceFunctionSpecificationRef",
        "@referredType": "ResourceFunctionSpecification"
    },



    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 4.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 22, 2020 03:36

    Thanks  @Vance Shipley. I will cross-check with the JSON schemas and get back to you if any further questions.



    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------



  • 5.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 22, 2020 03:59

    Hi  @Vance Shipley,

    I am trying to locate ResourceFunction.schema.json in https://github.com/tmforum-rand/schemas/tree/candidates/Resource, however it is not there.

    Any specific branch or other location I should be checking?

    I can see that ResourceFunctionCreateEventPayload.schema.json under Open_API_And_Data_Model/apis/TMF664_Resource_Function_Activation/event-schemas makes reference to this ResourceFunction.schema.json

    Thanks,

    Anu



    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------



  • 6.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 22, 2020 07:19

    I am under the impression that the JSON schemas are going to be made public however I don't speak for TM Forum or the Open API team. In the mean time the Swagger (OAS) should suffice.  Here is ResourceFunction.



    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 7.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Dec 22, 2020 09:04

    I also believe that eventually the schemas will be published. The Git folder that you refer to https://github.com/tmforum-rand/schemas was presumably an earlier attempt to publish, under the RAND licensing terms, but it was last updated in Feb 2020.

    We'll have to wait patiently for a more formal publication. Like Vance I speak only for myself.



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



  • 8.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Jan 14, 2021 18:51
      |   view attached
    Hi @Vance Shipley,

    Thanks for the link. I can see this link is for version 1.3.0 swagger for tmf664.

     

    However, we are looking to do early adoption of the version 4.0.0 swagger for tmf664. I have sourced version 4.0.0 swagger from: https://github.com/tmforum-rand/Open_API_And_Data_Model/blob/v4.1/apis/TMF664_Resource_Function_Activation/swaggers/TMF664-ResourceFunctionActivation-v4.0.0.swagger.json

     

    As per the definitions used in v4 swagger, I am not able to see 'resourceSpecification', 'resourceCharacteristic' and 'activationFeature' as direct child objects under ResourceFunction (as per JSON example in TMF664 User Guide v4)? See attached image. Am I missing something here?

    Thanks, Anu

    ​​

    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------



  • 9.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Jan 14, 2021 20:21
    On  Jan 14, 2021 18:51 @Anu Aulakh​ wrote:
    >  As per the definitions used in v4 swagger, I am not able to see 'resourceSpecification', 'resourceCharacteristic' and 'activationFeature' as direct child objects under ResourceFunction (as per JSON example in TMF664 User Guide v4)?

    Aha, you have discovered a serious problem with the generated swagger for TMF664. While the schemas are IMHO rational it seems the tooling which generates the swagger hasn't followed the indirect references.

    Those attributes are indirectly inherited from class Resource.  The ResourceFunction schema includes:
    "allOf": [
        {
            "$ref": "../Resource/LogicalResource.schema.json#/definitions/LogicalResource"
        }
    ]​
    ... and the LogicallResource schema includes:
    "allOf": [
        {
            "$ref": "./Resource.schema.json#Resource"
        }
    ]​


    I'll see to it that this is corrected.



    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 10.  RE: TMF664 v4 - API specification

    TM Forum Member
    Posted Jan 14, 2021 21:09
    Yep makes sense. Thanks for that @Vance Shipley. Much appreciated.
    I have assigned following JIRA ticket to you for your reference: ​​

    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------