Parent: #4442
Convention
Avoid using Microsoft, Azure prefixes for any models or classes.
Source: Azure SDK for .NET Mgmt Naming Conventions
Observed today
A scan of Azure/azure-rest-api-specs (334 client.tsp files, 10,754 csharp-scoped @@clientName decorators) shows 164 decorators currently encoding this rule by hand. Examples:
AzureFunctionDefinition → InternalAzureFunctionDefinition (ai/Azure.AI.Agents/client.tsp)
AzureBlobContentSource → BlobContentSource (ai/DocumentIntelligence/client.tsp)
AzureBlobFileListContentSource → BlobFileListContentSource (ai/DocumentIntelligence/client.tsp)
AzureApiManagementSource → ApiCenterApiManagementSource (apicenter/ApiCenter.Management/client.tsp)
AzureMonitorExporter → ApplicationInsightsRestClient (applicationinsights/data-plane/Exporters/client.tsp)
AzureLargeStorageInstance → LargeStorageInstance (azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/client.tsp)
Proposed linter
Detection
Flag any model whose name starts with Microsoft or Azure (case-sensitive). Allow well-known service identity types via a known-prefixed-types allowlist.
Auto-fix
Suggest dropping the prefix via @@clientName(..., "csharp").
Scope
The rule should be csharp-scoped — it only flags violations of the .NET convention, not the underlying TypeSpec name. It should suggest inserting a @@clientName(..., "csharp") override when the underlying TypeSpec name is intentional, or renaming the TypeSpec model when the convention applies cross-language.
Acceptance criteria
Parent: #4442
Convention
Avoid using
Microsoft,Azureprefixes for any models or classes.Observed today
A scan of
Azure/azure-rest-api-specs(334client.tspfiles, 10,754 csharp-scoped@@clientNamedecorators) shows 164 decorators currently encoding this rule by hand. Examples:AzureFunctionDefinition→InternalAzureFunctionDefinition(ai/Azure.AI.Agents/client.tsp)AzureBlobContentSource→BlobContentSource(ai/DocumentIntelligence/client.tsp)AzureBlobFileListContentSource→BlobFileListContentSource(ai/DocumentIntelligence/client.tsp)AzureApiManagementSource→ApiCenterApiManagementSource(apicenter/ApiCenter.Management/client.tsp)AzureMonitorExporter→ApplicationInsightsRestClient(applicationinsights/data-plane/Exporters/client.tsp)AzureLargeStorageInstance→LargeStorageInstance(azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/client.tsp)Proposed linter
Detection
Flag any model whose name starts with
MicrosoftorAzure(case-sensitive). Allow well-known service identity types via aknown-prefixed-typesallowlist.Auto-fix
Suggest dropping the prefix via
@@clientName(..., "csharp").Scope
The rule should be csharp-scoped — it only flags violations of the .NET convention, not the underlying TypeSpec name. It should suggest inserting a
@@clientName(..., "csharp")override when the underlying TypeSpec name is intentional, or renaming the TypeSpec model when the convention applies cross-language.Acceptance criteria
@azure-tools/typespec-client-generator-coreor@azure-tools/typespec-azure-resource-manager).website/src/content/docs/docs/libraries/.../rules/..chronus/changes/entry.