You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, in swagger emitter, it will put kind into the required list, see azure playground link.
But on the other hand, we also have test cases in cadl ranch to testify missing discriminator's case cadl ranch link.
If it's intentional, I wonder why? if it's not, I am curious why we should allow discriminator decorator on a property that doesn't exist ?
We did have some discussion about that, more when a discriminated union gets used in json merge patch where technically it could allow an optional discriminator.
What you are seeing though is a bug but also I think we want people to move awayt from the implicit discriminator property(where we magically inject it) See this issue #2589
Not sure if it's a bug or intentional, in the below case, public typespec playground link
the OpenAPI3 emitter output, will not put kind into required list
However, in swagger emitter, it will put kind into the required list, see azure playground link.
But on the other hand, we also have test cases in cadl ranch to testify missing discriminator's case cadl ranch link.
If it's intentional, I wonder why? if it's not, I am curious why we should allow discriminator decorator on a property that doesn't exist ?
/cc @xirzec
The text was updated successfully, but these errors were encountered: