Skip to content

Fix Acronym Casing in Generated Parameters #11672

Closed

Description

See this comment. The parameters ipv4 & ipv6 are generated as iPv4 and iPv6 instead of IPv4 and IPv6. It's possible the ToIdentifierName is not respecting this transformation.

Activity

  1. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

    🎯 Issue Triage

    Parameters named ipv4 and ipv6 are incorrectly generated as iPv4/iPv6 instead of the expected IPv4/IPv6 in the C# client emitter, suggesting ToIdentifierName doesn't handle acronym casing correctly.

    Category: Bug
    Area: emitter:client:csharp

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

    🔍 Analysis
    • The bug is in identifier name generation within the C# client emitter (@typespec/http-client-csharp).
    • ToIdentifierName likely splits on word boundaries but doesn't recognize known acronyms like IPv4/IPv6, causing incorrect PascalCase output (iPv4 instead of IPv4).
    • A fix would require maintaining an acronym/abbreviation list or special-casing known patterns so they are preserved or correctly capitalized.
    • Referenced in azure-sdk-for-net#62072.
    📝 Suggested next steps
    • Identify where ToIdentifierName is defined in the C# emitter codebase.
    • Add/update acronym handling logic to correctly uppercase known acronyms (e.g., IPv4, IPv6, HTTP, URL).
    • Add unit tests covering acronym casing transformations.

    Generated by Agentic Triage

  2. added a commit that references this issue on Aug 14, 2026
    d459235
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