Skip to content

C# server emitter union failures#10999

Draft
sophia-ramsey wants to merge 5 commits into
mainfrom
sramsey/csharp-server-union-failure
Draft

C# server emitter union failures#10999
sophia-ramsey wants to merge 5 commits into
mainfrom
sramsey/csharp-server-union-failure

Conversation

@sophia-ramsey

@sophia-ramsey sophia-ramsey commented Jun 16, 2026

Copy link
Copy Markdown
Member

I have identified some issues with the C# server emitter that result in files for unions not being emitted. I found this issues when emitting from this spec: ReasoningEffort in openai-openapi-pr

Failing scenarios:

  • null in any named union
  • unnamed string literals (ex: "none", "minimal", "low", instead of none: "none", minimal: "minimal", low: "low")
  • inline unions with string literals (ex. "none" | "minimal" | "low")

Passing scenarios:

  • string base + named variants without null
  • inline unions for properties

@pkg-pr-new

pkg-pr-new Bot commented Jun 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-server-csharp@10999

commit: 11bb907

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-server-csharp
Show changes

@typespec/http-server-csharp - fix ✏️

Update the union definition to include unnamed string literals and null

@azure-sdk-automation

azure-sdk-automation Bot commented Jun 16, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@sophia-ramsey sophia-ramsey force-pushed the sramsey/csharp-server-union-failure branch from a02b4f4 to a444737 Compare June 17, 2026 21:06
@sophia-ramsey sophia-ramsey force-pushed the sramsey/csharp-server-union-failure branch from a444737 to 496e67b Compare June 17, 2026 21:13
@sophia-ramsey sophia-ramsey changed the title C# server emitter test failures C# server emitter union failures Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant