resource-name-pattern
@azure-tools/typespec-azure-resource-manager/resource-name-pattern
Resource names must specify a pattern string using @pattern
, providing a regular expression that the name must match.
❌ Incorrect
model Employee is ProxyResource<{}> {
@key("employeeName")
@path
@segment("employees")
name: string;
}
✅ Correct
model Employee is ProxyResource<{}> {
...ResourceNameParameter<Employee>;
}