[Bug]: Empty example object was emitted when the model contains a enum type property #4416
Open
4 tasks done
Labels
Milestone
Describe the bug
The example for model
AA
is generated correctly; however, the example ofOutput
becomes an empty object when set the type of property to the enumTypes
in modelA
. It seems that this issue will disappear when replacing the type enum with a string literal.Output:
Reproduction
👇
https://typespec.io/playground?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7CtIZcmVzdNUZb3BlbmFwadwcMyI7Cgp1c2luZyBUeXBlU3BlYy5IdHRwO9AVUmVzdNEVT3BlbkFQSTsKCmVudW3FGHMgewogIEE6ICJhIjsKICBCOiAiYiI7Cn0KCkBleGFtcGxlKCPEI%2BQAijrGMy5BLAogIGHFNCwKfSkKbW9kZWwgQcVLzSjEUmE6IHN0cmluZ8VVxitC0StCxCtiOiBpbnQ2NMZ%2Fb25lT2YKQGRpc2NyaW1pbmF0b3IoIsQ1IikKdW5pb24gWMVIxWdC8wC0eDogxQjPa%2BQAvsVtNMQKfeoAwk91dHB1dMVUeDogWOoAsEHsANwiYeYBK%2FUA2ewA2iJi5AFK%2FwDX9QDX5wDY5gDZ9QDa8ADb5ACV5gDY5QGYxg3xANsyxVjEPVjkAN4%3D&e=%40typespec%2Fopenapi3&options=%7B%7D&version=0.60.x
Checklist
The text was updated successfully, but these errors were encountered: