arm-resource-duplicate-property
@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-propertyWarn about duplicate properties in resources.
Envelope properties should not be duplicated in the properties model.
Impact
Section titled “Impact”- Area: API, SDK
Reusing an envelope property name inside the RP-specific property bag violates the RPC contract.
LintDiff Equivalent
Section titled “LintDiff Equivalent”This rule corresponds to the LintDiff rule ArmResourcePropertiesBag.
❌ 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;}Suppression
Section titled “Suppression”Suppress only when required to match an existing API; otherwise do not reuse envelope property names in the rp-specific property bag.