microsoft / microsoft/typespec
[specs] add test for discriminated models with union discriminator
Open
lib:http-specs
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
Please add a test for a scenario like this
```tsp
@service
namespace Test;
@discriminator("type")
model ResponseFormat {
type: "text" | "json_object" | "json_schema";
}
model ResponseFormatText extends ResponseFormat {
type: "text";
}
op foo(): ResponseFormatText;
```
You can choose clearer names and test more scenarios
Contributor guide
Assessment
This issue has not been assessed yet.