Skip to content

arm-resource-action-no-segment

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

@armResourceAction should not be used with @segment.

If you need to rename the action, use @action(...) instead or omit the segment entirely.

  • Area: API, SDK

May indicate a resource action path that does not follow the standard segment layout.

This rule corresponds to the LintDiff rule PathForResourceAction (partial).

@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;

Suppress when the resulting path is correct; otherwise use @action to define the final path segment with the standard resource action templates.