Hi Alen
Indeed, the file is generated that way - the source schema for ContactMedium does not have the discriminator.
The allOf in the class ContactMedium is only to add the properties from the Extensible schema to the specific contact medium properties (id, preferred, contactType, validFor).
The discriminator is added so that the subclasses will be included in the OAS file.
I'm not sure if your suggestion is "better", but I'm not a swagger/OAS expert so I'd leave it to others to express an opinion.
------------------------------
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: Apr 08, 2024 09:34
From: Alen Ruvic
Subject: OAS3 allOf composition in combination with discriminator
Is following maybe better:

------------------------------
Alen Ruvic
SES Astra S.A.
------------------------------