Closed stocksr closed 1 year ago
Hi. I'm struggling with the time to support the project, specially because as it is it works for us for years already. New features are always from PR's, and this feature is logical. If you'd like to submit a PR with the code conventions and test cases, it will be merged. Otherwise, just close this issue. I don't see a reason to make it optional, to be honest. But as I said, I don't have much time to invest in this project, so review / merge may take a while.
Bringing back this thread because I've the same issue. My current solution would keep the discriminator property on the base type, but also force the discriminator into the derived types.
@luisfpg Would you be okay with a PR with this behavior?
Hi @luisfpg , do you think you have time to check the PR? it seems to me everything should be ok (no breaking changes, tests are all green).
Thanks!
Took me some time, but this is released in 0.25.0. Thanks!
Hard to explain exactly what I would like so an example: current output
desired output
source api spec
Justification is to enable typescript magic type narrowing.
Because I really want this I have hacked together a proof of concept. (see this branch )
Questions: