I discovered this when using a JSON validator. We have a discriminator keyword on all of our objects, however its usage is not correct. It's meant to be used with oneOf where the propertyName in the discriminator indicates what property can be used to distinguish the appropriate object in the oneOf union.
Because we aren't using oneOf anywhere, we should essentially delete all of the discriminators.
I discovered this when using a JSON validator. We have a
discriminator
keyword on all of our objects, however its usage is not correct. It's meant to be used withoneOf
where thepropertyName
in thediscriminator
indicates what property can be used to distinguish the appropriate object in theoneOf
union.Because we aren't using
oneOf
anywhere, we should essentially delete all of the discriminators.