resource-name
@azure-tools/typespec-azure-resource-manager/resource-nameCheck the resource name.
ARM resource model names must contain only alphanumeric characters (starting with an uppercase letter), and the name property must be a read-only @path parameter.
Impact
Section titled “Impact”- Area: API, SDK
Invalid characters in a resource name violate the RPC contract and produce invalid client parameter names, preventing SDK generation.
❌ Incorrect
Section titled “❌ Incorrect”Missing @path decorator on name:
model FooResource is TrackedResource<{}> { @key("foo") @segment("foo") name: string;}❌ Incorrect
Section titled “❌ Incorrect”Underscore in model name:
model Foo_Resource is TrackedResource<{}> { ...ResourceNameParameter<Foo_Resource>;}✅ Correct
Section titled “✅ Correct”model FooResource is TrackedResource<{}> { ...ResourceNameParameter<FooResource>;}Suppression
Section titled “Suppression”Treat like any invalid resource name and require a fix. Use only valid characters.