Update azure-typespec/http-client-csharp-mgmt version to prerelease 1.0.0-alpha.20260418.1#58332
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the @azure-typespec/http-client-csharp-mgmt emitter prerelease version and applies the resulting regenerated Azure.ResourceManager.Quota (Quota RP) code changes.
Changes:
- Bumps
@azure-typespec/http-client-csharp-mgmtfrom1.0.0-alpha.20260416.1to1.0.0-alpha.20260418.1(plus lockfile update). - Regenerates Quota management SDK code to route SubscriptionQuotaAllocationsList operations through management-group subscription scope and require
groupQuotaName/resourceProviderNameparameters. - Regenerates QuotaAllocationRequestStatusCollection to carry
groupQuotaName/resourceProviderNameon the collection instance and update REST request construction accordingly.
Reviewed changes
Copilot reviewed 1 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/quota/Azure.ResourceManager.Quota/src/Generated/SubscriptionQuotaAllocationsListCollection.cs | Updates resource id validation + changes Get/Exists APIs to take groupQuotaName/resourceProviderName and adjusts REST request parameter mapping. |
| sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaAllocationRequestStatusCollection.cs | Adds stored _groupQuotaName/_resourceProviderName used in request construction; updates scope validation and request parameter mapping. |
| sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/QuotaExtensions.cs | Updates public extension method signatures and forwarding to include groupQuotaName/resourceProviderName. |
| sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/MockableQuotaArmClient.cs | Updates mockable forwarding APIs to new signatures; adds validation for subscription quota allocations inputs. |
| eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json | Updates emitter dependency version. |
| eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json | Updates resolved emitter package version + integrity metadata. |
Files not reviewed (1)
- eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json: Language not supported
| /// <param name="resourceProviderName"> The resourceProviderName for the resource. </param> | ||
| internal QuotaAllocationRequestStatusCollection(ArmClient client, ResourceIdentifier id, string groupQuotaName, string resourceProviderName) : base(client, id) | ||
| { | ||
| TryGetApiVersion(QuotaAllocationRequestStatusResource.ResourceType, out string quotaAllocationRequestStatusApiVersion); |
There was a problem hiding this comment.
groupQuotaName and resourceProviderName are stored and later used to build request URIs, but they are never validated. Passing null/empty will fail later (e.g., during URI construction) with less actionable exceptions or malformed paths. Add Argument.AssertNotNullOrEmpty for both parameters in the constructor (or ensure they’re validated before constructing this collection).
| TryGetApiVersion(QuotaAllocationRequestStatusResource.ResourceType, out string quotaAllocationRequestStatusApiVersion); | |
| TryGetApiVersion(QuotaAllocationRequestStatusResource.ResourceType, out string quotaAllocationRequestStatusApiVersion); | |
| Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); | |
| Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); |
| /// <returns> Returns a collection of <see cref="QuotaAllocationRequestStatusResource"/> objects. </returns> | ||
| public virtual QuotaAllocationRequestStatusCollection GetQuotaAllocationRequestStatuses(ResourceIdentifier scope) | ||
| public virtual QuotaAllocationRequestStatusCollection GetQuotaAllocationRequestStatuses(ResourceIdentifier scope, string groupQuotaName, string resourceProviderName) | ||
| { |
There was a problem hiding this comment.
GetQuotaAllocationRequestStatuses accepts groupQuotaName/resourceProviderName but doesn’t validate them, unlike the similar GetSubscriptionQuotaAllocationsList* methods above. This allows null/empty values to flow into QuotaAllocationRequestStatusCollection and then into request URI building. Add Argument.AssertNotNullOrEmpty checks for both parameters here (and/or in the downstream methods) for consistent parameter validation.
| { | |
| { | |
| Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); | |
| Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); |
| public static Response<SubscriptionQuotaAllocationsListResource> GetSubscriptionQuotaAllocationsList(this ArmClient client, ResourceIdentifier scope, string groupQuotaName, string resourceProviderName, AzureLocation location, CancellationToken cancellationToken = default) | ||
| { | ||
| Argument.AssertNotNull(client, nameof(client)); | ||
|
|
||
| return GetMockableQuotaArmClient(client).GetSubscriptionQuotaAllocationsList(scope, location, cancellationToken); | ||
| return GetMockableQuotaArmClient(client).GetSubscriptionQuotaAllocationsList(scope, groupQuotaName, resourceProviderName, location, cancellationToken); |
There was a problem hiding this comment.
This change updates a public extension-method signature, but the committed API listings under sdk/quota/Azure.ResourceManager.Quota/api/ still contain the old GetSubscriptionQuotaAllocationsList(this ArmClient, ResourceIdentifier, AzureLocation, ...) shape (and similarly for other updated Quota extensions). Please regenerate/update the API files (netstandard2.0/net8.0/net10.0) so the public API surface matches the code and CI API checks don’t fail.
Generated by branded - http-client-csharp-mgmt build 20260418.1
Triggered from branch: main