arm-resource-name-pattern
@azure-tools/typespec-azure-resource-manager/arm-resource-name-patternThe resource name parameter should be defined with a ‘pattern’ restriction.
Use a regular expression that accurately describes valid resource names so invalid names can be rejected before requests are sent.
Impact
Section titled “Impact”- Area: API
The resource name lacks the required pattern restriction, violating the RPC contract.
LintDiff Equivalent
Section titled “LintDiff Equivalent”This rule corresponds to the LintDiff rule ResourceNameRestriction.
❌ Incorrect
Section titled “❌ Incorrect”model Employee is ProxyResource<{}> { @key("employeeName") @path @segment("employees") name: string;}✅ Correct
Section titled “✅ Correct”model Employee is ProxyResource<{}> { ...ResourceNameParameter<Employee>;}Suppression
Section titled “Suppression”Suppress only when required to match an existing API; otherwise use @pattern or the ResourceNameParameter template with a pattern string or union type.