Skip to content

Conversation

@tmacam
Copy link

@tmacam tmacam commented Nov 29, 2025

Mostly focusing on A, AAAA, TXT and CName records.

  • DnsARecord: Ipv4Addresses to Ipv4Address. Something similar on DnsAaaaRecord.
  • using nameof instead of the properties names as strings.
  • DnsCnameRecord.Cname was 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.

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.
Copilot AI review requested due to automatic review settings November 29, 2025 03:12
@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Provisioning labels Nov 29, 2025
@github-actions
Copy link

Thank you for your contribution @tmacam! We will review the pull request and get back to you soon.

Copilot finished reviewing on behalf of tmacam November 29, 2025 03:14
Copy link
Contributor

Copilot AI left a 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 Ipv4Addresses to Ipv4Address in DnsARecordInfo and Ipv6Addresses to Ipv6Address in DnsAaaaRecordInfo to better reflect that each info object holds a single IP address
  • Replaced string literals with nameof operator for type-safe property references in DnsARecord, DnsTxtRecord, and DnsCnameRecord
  • Fixed the property path mapping for DnsCnameRecord.Cname to 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"]);
Copy link

Copilot AI Nov 29, 2025

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.

Suggested change
_ipv6Address = DefineProperty<IPAddress>("IPv6Address", ["ipv6Address"]);
_ipv6Address = DefineProperty<IPAddress>(nameof(Ipv6Address), ["ipv6Address"]);

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.Provisioning.Dns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Provisioning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant