Skip to content

operation-missing-api-version

Id
@azure-tools/typespec-azure-core/operation-missing-api-version

Operations need an api version parameter.

Ensure all operations have an apiVersion parameter.

  • Area: API, SDK

An operation without an api-version parameter cannot evolve across api-versions.

This rule corresponds to the LintDiff rule ApiVersionParameterRequired.

op createPet(pet: Pet): void;
op createPet(pet: Pet, ...Azure.Core.Foundations.ApiVersionParameter): void;

Do not suppress unless it is a false positive. Use the standard operation templates.