-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[Quota] SDK validation for TypeSpec #52052
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
Conversation
sdk/quota/Azure.ResourceManager.Quota/src/Custom/ArmQuotaModelFactory.cs
Outdated
Show resolved
Hide resolved
sdk/quota/Azure.ResourceManager.Quota/src/Custom/ArmQuotaModelFactory.cs
Outdated
Show resolved
Hide resolved
sdk/quota/Azure.ResourceManager.Quota/src/Custom/Models/UnknownLimitJsonObject.cs
Show resolved
Hide resolved
...zure.ResourceManager.Quota/tests/Generated/Samples/Sample_CurrentQuotaLimitBaseCollection.cs
Show resolved
Hide resolved
sdk/quota/Azure.ResourceManager.Quota/src/Custom/ArmQuotaModelFactory.cs
Outdated
Show resolved
Hide resolved
sdk/quota/Azure.ResourceManager.Quota/src/Custom/ArmQuotaModelFactory.cs
Outdated
Show resolved
Hide resolved
sdk/quota/Azure.ResourceManager.Quota/src/Custom/ArmQuotaModelFactory.cs
Show resolved
Hide resolved
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 updates the Azure Quota SDK to use a new TypeSpec specification, adding new enforcement status capabilities and updating existing model factories for better parameter ordering consistency.
- Adds new GroupQuotasEnforcementStatus resources for managing quota enforcement settings
- Updates model factory methods to provide better parameter consistency
- Includes custom code for handling type renaming workarounds
Reviewed Changes
Copilot reviewed 6 out of 113 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/quota/Azure.ResourceManager.Quota/src/autorest.md.bak | Updates Azure REST API specs commit reference |
| sdk/quota/Azure.ResourceManager.Quota/src/Custom/Models/UnknownLimitJsonObject.cs | Adds workaround for code generator type renaming limitation |
| sdk/quota/Azure.ResourceManager.Quota/src/Custom/ArmQuotaModelFactory.cs | Provides custom model factory methods with consistent parameter ordering |
| sdk/quota/Azure.ResourceManager.Quota/assets.json | Updates asset tag reference |
| sdk/quota/Azure.ResourceManager.Quota/api/Azure.ResourceManager.Quota.netstandard2.0.cs | Adds new enforcement status APIs and updated model factory signatures |
| sdk/quota/Azure.ResourceManager.Quota/api/Azure.ResourceManager.Quota.net8.0.cs | Adds new enforcement status APIs and updated model factory signatures |
| /// <param name="availableLimit"> The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s). </param> | ||
| /// <param name="allocatedToSubscriptionsValue"> Quota allocated to subscriptions. </param> | ||
| /// <returns> A new <see cref="Models.GroupQuotaDetails"/> instance for mocking. </returns> | ||
| public static GroupQuotaDetails GroupQuotaDetails(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null) |
Copilot
AI
Aug 22, 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.
The parameter order in this method differs from the order used in the internal constructor call (lines 25-33). Consider reordering the parameters to match the constructor signature for better maintainability and to reduce confusion.
| public static GroupQuotaDetails GroupQuotaDetails(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null) | |
| public static GroupQuotaDetails GroupQuotaDetails(string resourceName, long? limit, string comment, string unit, string value = null, string localizedValue = null, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null) |
| /// <param name="availableLimit"> The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s). </param> | ||
| /// <param name="allocatedToSubscriptionsValue"> Quota allocated to subscriptions. </param> | ||
| /// <returns> A new <see cref="Models.GroupQuotaLimitProperties"/> instance for mocking. </returns> | ||
| public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null) |
Copilot
AI
Aug 22, 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.
Similar to GroupQuotaDetails, the parameter order in this method differs from the order used in the internal constructor call (lines 48-56). Consider reordering the parameters to match the constructor signature for consistency.
| public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null) | |
| public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName, long? limit, string comment, string unit, string value = null, string localizedValue = null, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null) |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
|
Hi @HarveyLink. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Hi @HarveyLink. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing |
This is the SDK validation for Quota.
TSP link: Azure/azure-rest-api-specs#35884
TODO:
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.