arm-resource-operation
@azure-tools/typespec-azure-resource-manager/arm-resource-operationValidate that all ARM Resource operations are defined inside an interface, include an api-version parameter, and use the correct decorator for the HTTP verb.
❌ Incorrect
Section titled “❌ Incorrect”Operations must be inside an interface:
// Operation defined outside of an interface@armResourceRead(FooResource)@getop getFoos(...ApiVersionParameter): FooResource;Operations must use the correct ARM resource decorator for the HTTP verb:
@armResourceOperationsinterface FooResources { // Missing @armResourceCreateOrUpdate decorator @put createOrUpdate( ...ResourceInstanceParameters<FooResource>, @bodyRoot resource: FooResource, ): ArmResponse<FooResource>;}✅ Correct
Section titled “✅ Correct”@armResourceOperationsinterface FooResources { get is ArmResourceRead<FooResource>; createOrUpdate is ArmResourceCreateOrReplaceAsync<FooResource>;}Reviewer advice
Section titled “Reviewer advice”Impacts generated SDKs, the API, and Emitters: missing resource operation decorators can leave operations unassociated with the correct resource, breaking the C# SDK and resource-based reasoning, linting, and resource-centric content. Ask the author to use standard resource types, or @customAzureResource if standard types are not possible, and to use operation templates. Accept a suppression only with C# SDK signoff after carefully checking for related violations.