Hi Suresh,
we had exactly the same problem and we did nearly exactly the same change to our yaml. For me, this was an overlook in the existing yaml because, as you said, the relationship exists between the ServiceTestSpecification entities.
I posted the same type of request as you in the forum not long ago:
https://engage.tmforum.org/discussion/tmf653-missing-servicetestrelationship
We ended up with the following structure added:
serviceTestRelationship:
type: array
description: a list of ServiceTest relationships
items:
$ref: '#/components/schemas/ServiceTestRelationship'
and
ServiceTestRelationship:
allOf:
- $ref: '#/components/schemas/Extensible'
- type: object
properties:
serviceTest:
$ref: '#/components/schemas/ServiceTestRefOrValue'
relationshipType:
type: string
discriminator:
propertyName: '@type'
mapping:
ServiceTestRelationship: '#/components/schemas/ServiceTestRelationship'
So in the ServiceTestRelationship definition, the property should be "serviceTest" and not "serviceTestRelationship" like it was displayed in your screenshot.
Finally, ServiceTestRefOrvalue is a copy of ServiceTest similar to what can be found in TMF638 with Service and ServiceRefOrValue.
Best regards,
------------------------------
Frederic Thise
Proximus SA
------------------------------