Thanks Maria for your contribution. I'll add that from a technical (Swagger/OAS) perspective, the discriminator gives a "hint" at runtime as to the actual concrete data type of the payload. Taking Characteristic as an example, you will notice that the base class does not have a value property. When I create a payload, let's say by GET on Product (inventory), for a broadband product, the bandwidth is a StringCharacteristic with value = 200Mbps. So this will look like:
{ "value": "200Mbps", "name": "bandwidth", "@type": "StringCharacteristic"}
The @type is used to elect the schema for StringCharacteristic.
Hope it is clear
------------------------------
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: Jun 24, 2024 08:34
From: Maria Eugenia Ramos
Subject: TMF717 - Customer360 Management - discriminator in schema objects
Hi Abhilash, here is my understanding. I hope this helps.
------------------------------
Maria Eugenia Ramos
Líder Técnico del CoE Regional
TELEFONICA
Original Message:
Sent: Jun 21, 2024 02:21
From: Abhilash Prasad
Subject: TMF717 - Customer360 Management - discriminator in schema objects
Hi,
TMF717 - Customer360 Management API version5 is released recently. Can any one please help me to understand the role of discriminator in Characteristic, ContactMedium, partyOrPartyRole, Party, PartyRole schema objects.
Thanks
------------------------------
Abhilash Prasad
Jio Platforms Limited
------------------------------