Skip to content
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

workarounds - normalize example value in resource ID user specified segment to prevent erroneous diffs #4465

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

stephybun
Copy link
Member

@stephybun stephybun commented Oct 4, 2024

At some point we began experiencing flapping diffs in the example value for resource ID segments

Example PR of this phenomenon:
#4433
#4461

This workaround was added to standardize the resource ID segments to be consistent when resource IDs that are actually the same are defined with different user defined segments in the swagger e.g.

/subscription/{subscriptionId}/resourceGroup/resourceGroupName/provider/Microsoft.SomeProvider/virtualMachines/{virtualMachineName}
/subscription/{subscriptionId}/resourceGroup/resourceGroupName/provider/Microsoft.SomeProvider/virtualMachines/{name}

The example value which is metadata that we populate for documentation purposes when generating resources actually uses the same value that the segment name does, so this workaround should apply to the example value as well.

When merged this should cause a one time change of
3298 files changed, 4570 insertions(+), 4570 deletions(-) (Not taking into account any config changes that were merged as well)

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks @stephybun - LGTM 🦫

@stephybun stephybun merged commit 40370f5 into main Oct 9, 2024
3 checks passed
@stephybun stephybun deleted the b/prevent-diffs-in-example-value branch October 9, 2024 08:00
zaowang-ms pushed a commit to zaowang-ms/pandora that referenced this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants