Fix naming inconsistency in DnsRecordType enum#59354
Merged
Merged
Conversation
Add correctly-named enum values AAAA, CNAME, TLSA, NAPTR and mark old values Aaaa, Cname, Tlsa, Naptr as EditorBrowsable(Never) for backward compatibility. Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-net/sessions/f2102d54-dcdb-45e4-9f75-1078d1c0939c Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ArthurMa1978
May 20, 2026 03:25
View session
Per naming conventions, acronyms with more than 2 letters should only uppercase the first character. Add Caa, Ptr, Soa, Srv, Txt and mark old all-caps values CAA, PTR, SOA, SRV, TXT as EditorBrowsable(Never) for backward compatibility. Revert incorrect previous changes that added AAAA, CNAME, TLSA, NAPTR (these were already correctly named as Aaaa, Cname, Tlsa, Naptr). Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-net/sessions/cae2a6a3-52bd-477b-ada2-a474f9cfe72b Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
The generated serialization file must use the original enum member names (CAA, PTR, SOA, SRV, TXT) as the generator produces them, since both old and new names map to the same integer values. Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-net/sessions/884c83b6-d546-4d3a-a0f7-b96a241714bd Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves a naming inconsistency in Azure.ResourceManager.Dns.Models.DnsRecordType by introducing correctly cased enum members (for acronyms longer than 2 letters) while keeping the legacy uppercase members available for backwards compatibility.
Changes:
- Added new
DnsRecordTypemembers (Caa,Ptr,Soa,Srv,Txt) and assigned explicit numeric values to stabilize aliases. - Kept legacy members (
CAA,PTR,SOA,SRV,TXT) and marked them asEditorBrowsable(Never)to discourage new usage without breaking existing code. - Updated public API baselines and documented the change in the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/dns/Azure.ResourceManager.Dns/src/Customization/Models/DnsRecordType.cs | Adds new properly-cased enum members and hides legacy uppercase aliases via EditorBrowsable(Never). |
| sdk/dns/Azure.ResourceManager.Dns/CHANGELOG.md | Documents the new enum members and the hidden legacy aliases. |
| sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.netstandard2.0.cs | Updates public API baseline to include the new enum members. |
| sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.net8.0.cs | Updates public API baseline to include the new enum members. |
| sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.net10.0.cs | Updates public API baseline to include the new enum members. |
live1206
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #59353
dotnet build /t:GenerateCodeto regenerate