Fix model factory parameter naming: change eTag to etag for acronym compliance
#53477
+81
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Model factory methods in Azure Management SDKs were generating parameter names that don't follow .NET naming conventions for acronyms. Specifically, the
ETagproperty was being converted toeTaginstead of the correctetagin camelCase parameter names.According to .NET naming guidelines and existing Azure SDK patterns (e.g., ServiceFabric SDK), acronyms in camelCase identifiers should be all lowercase when they are 2 letters, or all lowercase except when they form the start of another word.
Root Cause
The
FirstCharToLowerCasemethod inStringExtensions.cswas too simplistic - it only converted the first character to lowercase, producingeTagfromETag. This didn't account for acronym naming conventions.Solution
Updated the
FirstCharToLowerCasemethod to properly handle acronyms according to .NET conventions:2-letter acronyms: Convert all to lowercase
ETag→etagID→id3+ letter acronyms followed by another word: Lowercase the acronym but keep the next word capitalized
XMLParser→xmlParserHTTPClient→httpClientAll uppercase strings: Convert all to lowercase
HTTP→httpABC→abcTesting
Impact
This change affects model factory methods in management plane SDKs. When SDKs are regenerated from their TypeSpec definitions, parameter names for acronyms will follow the proper .NET naming convention, consistent with other Azure SDK patterns.
Example Change
Original prompt
Fixes #53476
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.