arm-resource-patch
@azure-tools/typespec-azure-resource-manager/arm-resource-patchValidate ARM PATCH operations.
The request body of a PATCH must be a model with a subset of the resource properties. The PATCH body must not contain properties that do not exist on the resource.
Impact
Section titled “Impact”- Area: API
Inconsistent PATCH properties violate the RPC contract.
LintDiff Equivalent
Section titled “LintDiff Equivalent”This rule corresponds to the LintDiff rule ConsistentPatchProperties.
❌ Incorrect
Section titled “❌ Incorrect”model FooResource is TrackedResource<FooProperties> { ...ResourceNameParameter<FooResource>;}
model MyBadPatch { name?: string; ...Foundations.ArmTagsProperty; blah?: string; // does not exist on FooResource}✅ Correct
Section titled “✅ Correct”model FooResource is TrackedResource<FooProperties> { ...ResourceNameParameter<FooResource>;}
model FooPatch { name?: string; ...Foundations.ArmTagsProperty; properties?: FooProperties;}Suppression
Section titled “Suppression”Suppress per the RPC guidelines; otherwise use the standard PATCH operations.