Open qiaozha opened 1 month ago
the Dog type we get from from discriminatedSubtypes doesn't have the correct usage flags.
we should have Dog in models and set the usage the same as in Pet's discriminatedSubtypes. but it should be a low priority thing.
Describe the bug
In the following typespec,
The Dog subtype is not referenced by any operation, sdkPackage is not returning this subtype
however, inside the Pet's model definition, it still has Dog's type being referred in the discriminatedSubtypes.
which is confusing to me, if we generate the serializer/deserializer for Pet, we will have to a Dog serializer for it as it's polymorphic base and the discriminator value has a dog in it. but Dog's definition is missing.
I think we could have two possible solutions for it. Depends on how we want to interpret this.
Reproduction
N/A
Checklist