arm-resource-duplicate-property
@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-propertyWarns when a property defined in the resource envelope is also defined in the resource-specific properties bag. Envelope properties should not be duplicated in the properties model.
❌ Incorrect
Section titled “❌ Incorrect”@armProviderNamespacenamespace MyService;
model FooResource is TrackedResource<FooProperties> { ...ResourceNameParameter<FooResource>; ...ManagedServiceIdentityProperty;}
model FooProperties { name: string; // duplicate of envelope "name" identity: string; // duplicate of envelope "identity"}✅ Correct
Section titled “✅ Correct”@armProviderNamespacenamespace MyService;
model FooResource is TrackedResource<FooProperties> { ...ResourceNameParameter<FooResource>; ...ManagedServiceIdentityProperty;}
model FooProperties { displayName?: string;}Reviewer advice
Section titled “Reviewer advice”Impacts the API: this corresponds to the LintDiff rule ArmResourcePropertiesBag and causes an RPC violation. Ask the author not to reuse property names from the envelope in the RP-specific property bag. Do not accept a suppression unless it is needed to match existing APIs.