Skip to content

arm-resource-invalid-envelope-property

Id
@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property

Check for invalid resource envelope properties.

Resource envelope properties must originate from the Azure.ResourceManager namespace. Custom properties that are not part of the standard ARM resource envelope should be placed in the resource-specific property bag instead.

  • Area: API

Defining non-standard top-level envelope properties violates the RPC contract.

This rule corresponds to the LintDiff rule BodyTopLevelProperties.

@armProviderNamespace
namespace MyService;
model FooResource is TrackedResource<{}> {
...ResourceNameParameter<FooResource>;
disallowed?: string; // not valid in the resource envelope
}
@armProviderNamespace
namespace MyService;
model FooResource is TrackedResource<{}> {
...ResourceNameParameter<FooResource>;
...ManagedServiceIdentityProperty;
}

Suppress only when required to match an existing API; otherwise use the standard property mix-ins.