Skip to content

arm-common-types-version

Id
@azure-tools/typespec-azure-resource-manager/arm-common-types-version

Specify the latest ARM common-types version using @armCommonTypesVersion.

ARM services should explicitly select the latest version in Azure.ResourceManager.CommonTypes.Versions using @armCommonTypesVersion. Apply the decorator to the service namespace when all API versions use the same common-types version. A decorator on an API version enum member overrides the namespace selection for that API version.

The rule warns when explicit version configuration is missing or when an effective selection is older than the latest available version. It checks version selections, not individual legacy type usages.

  • Area: API, SDK

Missing or outdated common-types selections can leave an API and its generated SDKs using older shared schemas and parameters. Latest-version warnings are enabled wherever this rule is enabled, including the resource-manager ruleset.

@armProviderNamespace
namespace Microsoft.Contoso;

An explicit older selection also produces a warning:

@armProviderNamespace
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3)
namespace Microsoft.Contoso;

Select the latest version on the service namespace:

@armProviderNamespace
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v6)
namespace Microsoft.Contoso;

Alternatively, apply @armCommonTypesVersion to every API version enum member instead of the namespace. Every effective selection must use the latest version to satisfy this rule.

As of August 2026, v6 was the latest ARM common-types version. Newer versions may exist; check Azure.ResourceManager.CommonTypes.Versions before updating a service.

This rule covers the version-selection guidance of LatestVersionOfCommonTypesMustBeUsed. Unlike the OpenAPI rule, it does not inspect emitted common-type references.

Prefer updating @armCommonTypesVersion to the latest version. Suppress only when an older version is required for compatibility and the API and SDK impact has been accepted, or when no common-types are used and omitting the selection is intentional.

Place #suppress "@azure-tools/typespec-azure-resource-manager/arm-common-types-version" "Compatibility justification" above the service namespace for missing configuration or an unversioned selection, or above the affected API version enum member for a versioned selection. Suppressing the rule also suppresses its missing-configuration check within that scope.