Skip to content

[http-client-csharp] Preserve enum member underscores for backcompat - #11269

Merged
JoshLove-msft merged 6 commits into
microsoft:mainfrom
JoshLove-msft:joshlove/csharp-enum-underscore-backcompat
Jul 16, 2026
Merged

[http-client-csharp] Preserve enum member underscores for backcompat#11269
JoshLove-msft merged 6 commits into
microsoft:mainfrom
JoshLove-msft:joshlove/csharp-enum-underscore-backcompat

Conversation

@JoshLove-msft

Copy link
Copy Markdown
Contributor

Summary

  • match fixed enum members against the last contract while ignoring underscores
  • preserve the published member name when the underscore-insensitive match is unique
  • avoid applying ambiguous underscore-insensitive matches

Validation

  • npm run build
  • dotnet test packages/http-client-csharp/generator
  • npm run cop

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6491ba33-2a51-4d59-9596-b2ab0ec43a83
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jul 15, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6491ba33-2a51-4d59-9596-b2ab0ec43a83
@pkg-pr-new

pkg-pr-new Bot commented Jul 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@11269

commit: 599b4a9

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6491ba33-2a51-4d59-9596-b2ab0ec43a83
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6491ba33-2a51-4d59-9596-b2ab0ec43a83
@JoshLove-msft

Copy link
Copy Markdown
Contributor Author

Validated against all 15 Azure management libraries currently using \�xact\ by removing the wrappers locally and regenerating with the locally built generator plus each library's GA baseline. All 15 generations succeeded, and released enum members retained their existing names. The only exact-related API changes were \Tls1_3\ in Event Hubs and App Service; those members are not present in their current GA baseline packages, so backcompat intentionally has no prior name to restore. --generated by Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6491ba33-2a51-4d59-9596-b2ab0ec43a83
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6491ba33-2a51-4d59-9596-b2ab0ec43a83
@JoshLove-msft
JoshLove-msft added this pull request to the merge queue Jul 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 16, 2026
@JoshLove-msft
JoshLove-msft added this pull request to the merge queue Jul 16, 2026
Merged via the queue into microsoft:main with commit 887da67 Jul 16, 2026
29 checks passed
@JoshLove-msft
JoshLove-msft deleted the joshlove/csharp-enum-underscore-backcompat branch July 16, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants