[Bug]: `patch-envelope` lint rule is stricter than ARM RPC guidance for `sku` and `identity`
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 164
Description
### 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](https://github.com/cloud-and-ai-microsoft/resource-provider-contract/blob/master/v1.0/patch-resource.md):
| 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
- [x] Follow our [Code of Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
- [x] Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the [TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
- [x] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Assessment
This issue has not been assessed yet.