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.
❌ 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;}Reviewer advice
Section titled “Reviewer advice”Impacts the API: this corresponds to the LintDiff rule ConsistentPatchProperties and causes an RPC violation. Ask the author to use standard Patch operations. Accept a suppression only when allowed by RPC guidelines.