Skip to content

Normalization refinement including enum member name#2839

Merged
MaryGao merged 141 commits intoAzure:mainfrom
MaryGao:enum-key-name-norm
Mar 5, 2025
Merged

Normalization refinement including enum member name#2839
MaryGao merged 141 commits intoAzure:mainfrom
MaryGao:enum-key-name-norm

Conversation

@MaryGao
Copy link
Copy Markdown
Member

@MaryGao MaryGao commented Sep 25, 2024

fixes #2832
fixes #2958

design doc

Agreements:

  • Not leverage a vocabulary to split words.
  • Limit the charset to alphanumeric characters.
  • Add underscore_ before leading digits and report warnings for renaming.
  • Not maintain acronym wordlist and treat len <= 3 & fully uppercases as acronyms and report warnings for renaming.
  • Provide functionality to allow authors to customize their own acronyms.
  • If first word is all uppercase and for camelCase we would make it all lowercases

Comment thread packages/typespec-ts/test/unit/uriTemplate.spec.ts Outdated
Copy link
Copy Markdown
Member

@qiaozha qiaozha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaryGao could you point to me where can customers add their own word list if they don't want them to be normalized?

Copy link
Copy Markdown
Member

@qiaozha qiaozha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please create an issue to track the word list for customization.

@MaryGao
Copy link
Copy Markdown
Member Author

MaryGao commented Mar 5, 2025

please create an issue to track the word list for customization.

Issue created: #2839 (review).

@MaryGao MaryGao enabled auto-merge (squash) March 5, 2025 10:02
@MaryGao MaryGao merged commit fafee86 into Azure:main Mar 5, 2025
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.

ExternalError: Emitter "@azure-tools/typespec-ts" crashed Normalize enum member name in modular and breaking review

5 participants