-
Notifications
You must be signed in to change notification settings - Fork 330
Labels
bugSomething isn't workingSomething isn't workingcompiler:coreIssues for @typespec/compilerIssues for @typespec/compilertriaged:core
Milestone
Description
Describe the bug
When a namespace is annotated with @versioned, example generation (@opExample) breaks if the operation’s return type includes a union that references an enum.
The same code works correctly if @versioned is removed.
Reproduction
- Create a @versioned namespace.
- Define an enum and a discriminated union using that enum.
- Add @opExample annotations to an operation returning that union.
- Compile or generate OpenAPI — the example generation fails or produces invalid output.
Minimal example here
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
ershov-konst
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompiler:coreIssues for @typespec/compilerIssues for @typespec/compilertriaged:core