Skip to content

Ensure Generated Enums Members in Extensible Enums Follow Naming Guidelines #12602

Open

Description

.NET naming guidelines for enums call for Pascal case https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions. There's at least one library where we generate an extensible enum member in all caps : link.

For extensible enum members, we should ensure we follow pascal casing unless exact was specified.

Activity

  1. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    🎯 Issue Triage

    The C# client emitter can preserve all-uppercase names for extensible-enum members, producing public API names that do not follow .NET PascalCase guidelines. Exact-name requests should remain unchanged.

    Category: Bug

    Area: emitter:client:csharp

    ⚠️ No reproduction provided. A minimal repro would help diagnose this issue.

    🔍 Analysis

    This affects extensible-enum member-name generation in @typespec/http-client-csharp; wire values should remain unchanged. The likely gap is in the generated-name casing path used by extensible enums, which appears to retain all-uppercase identifiers when exact is not set. #12070 is related because it changed acronym normalization for enum and union members, but it addresses acronym boundaries rather than this general PascalCase behavior and is not a clear duplicate.

    📝 Suggested next steps

    Generated by Agentic Triage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingemitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions