Skip to content

Refactor enum creation#9197

Merged
jorgerangel-msft merged 2 commits intomicrosoft:mainfrom
jorgerangel-msft:enum-public
Dec 12, 2025
Merged

Refactor enum creation#9197
jorgerangel-msft merged 2 commits intomicrosoft:mainfrom
jorgerangel-msft:enum-public

Conversation

@jorgerangel-msft
Copy link
Contributor

@jorgerangel-msft jorgerangel-msft commented Dec 11, 2025

This PR refactors the enum creation to allow visitors to mutate an enum's namespace and the generator to load any custom code in the new namespace for said visitor, before the final enum type is added to the output library.

fixes: Azure/azure-sdk-for-net#54368

@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 Dec 11, 2025
@github-actions
Copy link
Contributor

No changes needing a change description found.

@jorgerangel-msft jorgerangel-msft force-pushed the enum-public branch 2 times, most recently from ebcbec4 to 3130718 Compare December 11, 2025 23:47
@jorgerangel-msft jorgerangel-msft force-pushed the enum-public branch 5 times, most recently from a1333f4 to 87ec36d Compare December 12, 2025 16:39
@jorgerangel-msft jorgerangel-msft changed the title [wip]: experiment overriding typefactory for ns rename [wip]: refactor enum creation Dec 12, 2025
@jorgerangel-msft jorgerangel-msft force-pushed the enum-public branch 2 times, most recently from 5097ad4 to e72e105 Compare December 12, 2025 18:59
@jorgerangel-msft jorgerangel-msft changed the title [wip]: refactor enum creation Refactor enum creation Dec 12, 2025
@jorgerangel-msft jorgerangel-msft added this pull request to the merge queue Dec 12, 2025
Merged via the queue into microsoft:main with commit 69e56d2 Dec 12, 2025
22 checks passed
@jorgerangel-msft jorgerangel-msft deleted the enum-public branch December 12, 2025 21:55
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.

Custom code cannot change an enum to an extensible enum in the new MPG.

2 participants