Hi Igor,
We use the class ServiceRefOrValue meaning that you can pass either a service reference (via id) or a service description (by value) - this class feature a allOf serviceRef and service.
Depending on the action item the requested service attributes are not the same
- for a new service (item action add) we expect to get a service value and in this case the serviceSpecification.id must be there(but not the service.id)
- For a service modification(item action modify) or termination (action delete) the serviceSpecification.id is not required but service.id is.
So this is conditionnal: service.id is not fill for add, serviceSpecification.id is not fill in change or delete request --> we cannot enforce a mandatory rule in the API.
Moving forward with OAS (swagger 3.0) this is probably something that we'll improve. Indeed we can leverage oneOf to have the 2 classes in the class ServiceRefOrValue and managethe cardinality accordingly.
Hope it helps
Ludovic
------------------------------
Ludovic Robert
Orange
My answer are my own & don't represent necessarily my company or the TMF
------------------------------
Original Message:
Sent: Aug 27, 2020 14:23
From: Igor Veliev
Subject: TMF641. ServiceRefOrValue and serviceSpecification
Hi all,
The following is not clear from both 641 and 641B
- service (ServiceRefOrValue) : mandatory attributes not described at all
- service.serviceSpecification : how can it be optional on the service. Please, provide an example.
@Ludovic Robert, I hope you can help.
Thanks
------------------------------
Igor Veliev
Netcracker Technology
------------------------------