Describe the bug
Problem
The patch-envelope rule requires all envelope properties (identity, managedBy, plan, sku, tags) to be present in the PATCH body if they exist on the resource. This is stricter than the ARM RPC spec:
| Property |
ARM RPC Rule |
Requirement |
tags |
RPC-Patch-V1-03 |
must |
sku |
RPC-Patch-V1-09 |
may |
identity |
RPC-Patch-V1-11 |
may |
Resources that legitimately don't support updating sku or identity via PATCH (permitted by the spec) are incorrectly flagged.
Current Behavior
The rule reports:
The Resource PATCH request for resource 'MyResource' is missing envelope properties: [identity, sku]. Since these properties are supported in the resource, they must also be updatable via PATCH.
The "must" language contradicts the spec's "may" for sku/identity.
Expected Behavior
Differentiate by requirement level:
tags: Keep the warning (required per RPC).
sku, identity: Either don't flag, or use a lower severity (hint/info), since the spec says "may".
References
- Rule:
packages/typespec-azure-resource-manager/src/rules/patch-envelope-properties.ts
Reproduction
https://github.com/Azure/azure-rest-api-specs/blob/116779f2a6b5a8858dc3881b2e06a8b4b811cad9/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/CommonModels.tsp#L3930C1-L3931C19
Checklist
Describe the bug
Problem
The
patch-enveloperule requires all envelope properties (identity,managedBy,plan,sku,tags) to be present in the PATCH body if they exist on the resource. This is stricter than the ARM RPC spec:tagsskuidentityResources that legitimately don't support updating
skuoridentityvia PATCH (permitted by the spec) are incorrectly flagged.Current Behavior
The rule reports:
The "must" language contradicts the spec's "may" for
sku/identity.Expected Behavior
Differentiate by requirement level:
tags: Keep the warning (required per RPC).sku,identity: Either don't flag, or use a lower severity (hint/info), since the spec says "may".References
packages/typespec-azure-resource-manager/src/rules/patch-envelope-properties.tsReproduction
https://github.com/Azure/azure-rest-api-specs/blob/116779f2a6b5a8858dc3881b2e06a8b4b811cad9/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/CommonModels.tsp#L3930C1-L3931C19
Checklist