-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Minor fixers for Azure.Provisioning.Dns #54212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Mostly focusing on A, AAAA, TXT and CName records. * `DnsARecord`: `Ipv4Addresses` to `Ipv4Address`. Something similar to DnsAaaaRecordInfo. * using `nameof` instead of the properties names as strings. * `DnsCnameRecord.Cname` was not being backed by the `.properties.CNAMERecord.cname`. Fixed.
|
Thank you for your contribution @tmacam! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves consistency and correctness in the Azure.Provisioning.Dns library by renaming properties, adopting the nameof operator, and fixing property path mappings.
- Renamed
Ipv4AddressestoIpv4AddressinDnsARecordInfoandIpv6AddressestoIpv6AddressinDnsAaaaRecordInfoto better reflect that each info object holds a single IP address - Replaced string literals with
nameofoperator for type-safe property references inDnsARecord,DnsTxtRecord, andDnsCnameRecord - Fixed the property path mapping for
DnsCnameRecord.Cnameto correctly point to["properties", "cname"]
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/provisioning/Azure.Provisioning.Dns/src/Models/DnsAaaaRecordInfo.cs | Renamed property from Ipv6Addresses to Ipv6Address and updated backing field references |
| sdk/provisioning/Azure.Provisioning.Dns/src/Models/DnsARecordInfo.cs | Renamed property from Ipv4Addresses to Ipv4Address, updated backing field references, and adopted nameof operator |
| sdk/provisioning/Azure.Provisioning.Dns/src/DnsTxtRecord.cs | Replaced string literals with nameof operator for all property definitions |
| sdk/provisioning/Azure.Provisioning.Dns/src/DnsCnameRecord.cs | Replaced string literals with nameof operator and fixed property path from ["CNAMERecord", "cname"] to ["properties", "cname"] |
| sdk/provisioning/Azure.Provisioning.Dns/src/DnsARecord.cs | Replaced string literals with nameof operator for all property definitions |
| sdk/provisioning/Azure.Provisioning.Dns/README.md | Updated code example to use the new Ipv4Address property name |
| { | ||
| base.DefineProvisionableProperties(); | ||
| _ipv6Addresses = DefineProperty<IPAddress>("IPv6Addresses", ["ipv6Addresses"]); | ||
| _ipv6Address = DefineProperty<IPAddress>("IPv6Address", ["ipv6Address"]); |
Copilot
AI
Nov 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent use of nameof operator. While DnsARecordInfo uses nameof(Ipv4Address) for consistency, this file still uses the string literal "IPv6Address". For consistency, this should be nameof(Ipv6Address) to match the pattern used in DnsARecordInfo.cs.
| _ipv6Address = DefineProperty<IPAddress>("IPv6Address", ["ipv6Address"]); | |
| _ipv6Address = DefineProperty<IPAddress>(nameof(Ipv6Address), ["ipv6Address"]); |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Mostly focusing on A, AAAA, TXT and CName records.
DnsARecord:Ipv4AddressestoIpv4Address. Something similar onDnsAaaaRecord.nameofinstead of the properties names as strings.DnsCnameRecord.Cnamewas not being backed by the.properties.CNAMERecord.cname. Fixed.Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.