Skip to content

arm-resource-action-no-segment

Full name
@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment

The @armResourceAction decorator should not be used together with @segment. If you need to rename the action, use @action(...) instead or omit the segment entirely.

@armResourceAction(MyResource)
@segment("doSomething")
@post
op doAction(...ApiVersionParameter): void;
@armResourceAction(MyResource)
@post
op doAction(...ApiVersionParameter): void;
@armResourceAction(MyResource)
@action("doSomething")
@post
op doAction(...ApiVersionParameter): void;

Impacts the API and generated SDKs: this can indicate the resource action path is modeled incorrectly, though LintDiff partially covers it through PathForResourceAction. Ask the author to use @action for the final path segment with standard resource action templates. Suppress only if the actual emitted path works.