Skip to content

C# server emitter union failures#10999

Merged
sophia-ramsey merged 8 commits into
mainfrom
sramsey/csharp-server-union-failure
Jun 19, 2026
Merged

C# server emitter union failures#10999
sophia-ramsey merged 8 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: b47e2b5

@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
@sophia-ramsey sophia-ramsey marked this pull request as ready for review June 19, 2026 16:51
Comment thread packages/http-server-csharp/src/components/enums/enums.test.tsx
@sophia-ramsey sophia-ramsey added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit 38a554a Jun 19, 2026
33 checks passed
@sophia-ramsey sophia-ramsey deleted the sramsey/csharp-server-union-failure branch June 19, 2026 20:59
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.

2 participants