Mrteller
Mrteller
Thanks a lot for the idea, @czechboy0. It looked very promising. > Does this work? If you encode the value, does it include the discriminator (`"type"`) in the JSON payload?...
@simonjbeaumont , your suggestion could help if I was in control to the API. But I'm just trying to describe it in terms of OpenAPI spec.
I think the key to getting ahead is to narrow the number of cases covered to as few as possible unambiguous cases. Discriminator checking is at least in some form...
A bit unrelated note, @simonjbeaumont. I like the laconic syntax of A, B, C sample from [your answer](https://github.com/apple/swift-openapi-generator/issues/748#issuecomment-2747560369) and it passes all validations and even gets Swift `Client` and `Types`...
To clarity a couple of things with regard to A, B, C sample. > Should C still be represented as an enum that can be constructed on its own, since...
One more thought on this point: >The challenge is that at the definition of A, we don't know whichC is used as a discriminator. So we'd have to descend into...