Original Message:
Sent: Mar 04, 2021 06:35
From: Kalpana HV
Subject: TMF 639: Resource inventory management API extension
Apologies for the delayed response. Yes, understood and got the point... So, the resource model of resourceCollection would be
------------------------------
Kalpana HV
Colt Technology Services
Original Message:
Sent: Feb 28, 2021 00:57
From: Jonathan Goldberg
Subject: TMF 639: Resource inventory management API extension
Hi @Jan Lemmermann and @Kalpana HV
It seems that Jan is correct. In the Open API schema, we do derivation/inheritance using the allOf keyword, so it could be expected that the schema file ResourceCollection.Schema.json will include a statement such as:
"allOf": [
{
"$ref": "../Resource/Resource.schema.json#Resource"
}
]
In fact our current tooling expands these allOf when generating the API swagger file, so that the swagger for ResourceCollection will simply have all the attributes from Resource directly.
Hope it helps
------------------------------
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.
Original Message:
Sent: Feb 26, 2021 07:38
From: Jan Lemmermann
Subject: TMF 639: Resource inventory management API extension
Your variant is definitely also possible. I just wonder if it makes sense to introduce resourceCollectionRef, resourceCollectionSpecification and so on as new attributes.
According to SID a ResourceCollection is derived from Resource. So you inherit resourcecSpecification and the resourceRelationship array directly when you introduce a new REST resource in the API. So why not use these attributes instead of introducing new ones that end up doing the same thing, mapping relationships between resources.
Until now, I always assumed that if you apply polymorphism to TMF OpenAPI, the same basic principles apply.
Would be interesting to hear what others have to say about this.
Cheers,
Jan
------------------------------
Jan Lemmermann
OSS Lead Architect
EWE TEL GmbH
Original Message:
Sent: Feb 26, 2021 06:05
From: Kalpana HV
Subject: TMF 639: Resource inventory management API extension
Hi Jan,
The resource model would be something like
Thanks,
------------------------------
Kalpana HV
Colt Technology Services
Original Message:
Sent: Feb 25, 2021 08:08
From: Jan Lemmermann
Subject: TMF 639: Resource inventory management API extension
Hey Folks,
I'm not sure, but if I understood the proposal correctly, the response of the API could then look like this:
[ { "id": "1", "href": "http://inventory/tmf-api/resourceInventory/v4/resource/1", "name": "LR_1", "@type": "LogicalResource", "@baseType": "Resource", "resourceRelationship": [ { "relationshipType": "IsContainedIn", // Not sure if this is the correct and if we would need this. "href": "http://inventory/tmf-api/resourceInventory/v4/resource/3", "@type": "ResourceRelationship", "@referredType": "ResourceCollection" } ] }, { "id": "2", "href": "http://inventory/tmf-api/resourceInventory/v4/resource/2", "name": "LR_2", "@type": "LogicalResource", "@baseType": "Resource", "resourceRelationship": [ { "relationshipType": "IsContainedIn", // Not sure if this is the correct and if we would need this. "href": "http://inventory/tmf-api/resourceInventory/v4/resource/3", "@type": "ResourceRelationship", "@referredType": "ResourceCollection" } ] }, { "id": "3", "href": "http://inventory/tmf-api/resourceInventory/v4/resource/3", "name": "A ResourceCollection", "@type": "ResourceCollection", "@baseType": "Resource", "resourceRelationship": [ { "relationshipType": "HasCompoundResources", "href": "http://inventory/tmf-api/resourceInventory/v4/resource/1", "@type": "ResourceRelationship", "@referredType": "LogicalResource" }, { "relationshipType": "HasCompoundResources", "href": "http://inventory/tmf-api/resourceInventory/v4/resource/2", "@type": "ResourceRelationship", "@referredType": "LogicalResource" } ] }]
Is this going in the right direction?
Cheers,
Jan
------------------------------
Jan Lemmermann
OSS Lead Architect
EWE TEL GmbH
Original Message:
Sent: Feb 23, 2021 07:58
From: Pierre Robitaille
Subject: TMF 639: Resource inventory management API extension
[duplucate reply removed]