arm-common-types-version
@azure-tools/typespec-azure-resource-manager/arm-common-types-versionSpecify the ARM common-types version using @armCommonTypesVersion.
ARM services must specify the ARM common-types version using the @armCommonTypesVersion decorator. If the same common types version is used across all service versions, this decorator should be applied either on the service namespace or on each version enum member. If the common types version is updated in later versions, the decorator should appear on each version enum member.
Impact
Section titled “Impact”- Area: API, SDK
Indicates common-types are not being used, which normally surfaces as other violations too.
❌ Incorrect
Section titled “❌ Incorrect”@armProviderNamespacenamespace Microsoft.Contoso;✅ Correct
Section titled “✅ Correct”Apply @armCommonTypesVersion on the namespace:
@armProviderNamespace@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)namespace Microsoft.Contoso;✅ Correct (per version)
Section titled “✅ Correct (per version)”Apply @armCommonTypesVersion on each version enum member:
@armProviderNamespacenamespace Microsoft.Contoso;
enum Versions { @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v4) v1,
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) v2,}Suppression
Section titled “Suppression”Suppress only if no common-types are ever used and that is valid; otherwise associate a common-types version with each version in the Versions enum.