Yep makes sense. Thanks for that
. Much appreciated.
Original Message:
Sent: Jan 14, 2021 20:20
From: Vance Shipley
Subject: TMF664 v4 - API specification
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
Original Message:
Sent: Jan 14, 2021 18:51
From: Anu Aulakh
Subject: TMF664 v4 - API specification
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
Original Message:
Sent: Dec 22, 2020 07:18
From: Vance Shipley
Subject: TMF664 v4 - API specification
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
Original Message:
Sent: Dec 22, 2020 03:58
From: Anu Aulakh
Subject: TMF664 v4 - API specification
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
Original Message:
Sent: Dec 22, 2020 03:36
From: Anu Aulakh
Subject: TMF664 v4 - API specification
Thanks @Vance Shipley. I will cross-check with the JSON schemas and get back to you if any further questions.
------------------------------
Anu Aulakh
Telstra Corporation
Original Message:
Sent: Dec 22, 2020 03:18
From: Vance Shipley
Subject: TMF664 v4 - API specification
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
Original Message:
Sent: Dec 21, 2020 23:05
From: Anu Aulakh
Subject: TMF664 v4 - API specification
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
------------------------------