Skip to content

[specs] add test for discriminated models with union discriminator #7748

Open
@iscai-msft

Description

@iscai-msft

Please add a test for a scenario like this

@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

Metadata

Metadata

Assignees

Labels

lib:http-specsFor issues/prs related to the @typespec/http-specs package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions