Skip to content

Conversation

@ArcturusZhang
Copy link
Member

Fixes #54675

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 fixes the Name property issue in the SlotConfigNames resource by adding a default value for the Name property. The fix follows a similar pattern used for SiteAuthSettingsV2, where the Name property is configured with a default value generator.

  • Added customization in the generator specification to make SlotConfigNames Name property generate a default value and hide accessors
  • Implemented a partial class to provide the default Name value of "slotConfigNames"
  • Updated the generated code to use the default value instead of treating Name as an output-only property

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs Added customization for SlotConfigNamesResource Name property to generate default value, hide accessors, and make it not read-only
sdk/provisioning/Azure.Provisioning.AppService/src/SlotConfigNames.cs New partial class implementation providing a public Name getter and default value method returning "slotConfigNames"
sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SlotConfigNames.cs Removed the public Name property declaration (moved to partial class) and changed the property definition from output-only to use the default value
sdk/provisioning/Azure.Provisioning.AppService/CHANGELOG.md Added changelog entry documenting the fix for issue #54675

/// <summary>
/// Gets the Name.
/// </summary>
public BicepValue<string> Name
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

The public Name property getter is being exposed in the partial class, which appears inconsistent with the specification customization that sets HideAccessors=true. The SiteAuthSettingsV2 resource, which uses the same pattern, doesn't override the Name property with a public getter in its partial class. If the intention is to hide the setter while keeping the getter public, this pattern deviates from SiteAuthSettingsV2 and should be documented or reconsidered for consistency.

Suggested change
public BicepValue<string> Name
internal BicepValue<string> Name

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Property Name of SlotConfigNames in Azure.Provisioning.AppService defined as read-only

1 participant