Open vanslly opened 5 years ago
Will leave this open for now, in case there's interest from others in this feature.
Is that a valid schema for the discriminator? I don't see any way of linking SalesReturnTransaction
to TransactionType.SalesReturnTransaction
other than them having the same name which seems flaky.
In AOS 3 there's provision for
oneOf
being used along with adiscriminator
, which allows specifying an array where the types are discriminated based on a property. https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/Expected TypeScript: