Skip to content

ARM RPC Guidelines and TypeSpec Linting Coverage

Azure Resource Manager (ARM) defines a set of Resource Provider Contract (RPC) guidelines that all ARM resource providers must follow. TypeSpec encodes many of these guidelines into linting rules that run during compilation, helping service authors catch violations early.

This page maps each RPC guideline to the TypeSpec linting rules that cover or partially cover it, identifies gaps, and categorizes uncovered guidelines. Where TypeSpec linting cannot enforce a guideline β€” whether due to infrastructure, runtime, or design concerns β€” service owners are responsible for verifying compliance through other means such as runtime tests, design reviews, or manual validation.

SymbolMeaning
βœ…Fully covered by TypeSpec linting rule or ARM TypeSpec templates
πŸ”ΆPartially covered β€” some aspects checked, service owners must verify the rest
❌No linting coverage
πŸ”§Enforced by TypeSpec ARM templates/patterns rather than a linting rule
πŸ—οΈInternal ARM infrastructure concern β€” not in the customer-facing API description
πŸ”„Service runtime behavior β€” must be verified through runtime testing
πŸ“Design guidance β€” requires human judgment, must be verified through design reviews
🟣New linting rule needed β€” a TypeSpec linting rule could be added to improve or complete coverage

The following table lists each ARM RPC rule by its rule number and maps it to the TypeSpec linting rules that provide coverage. For πŸ”Ά partially covered rules, the Notes column describes what is and is not covered, and service owners are responsible for verifying the uncovered aspects β€” specific suggestions are provided where possible.

RPC RuleDescriptionCoverageTypeSpec Rule(s)Notes
RPC003Tracked resource types must support move❌ πŸ—οΈβ€”Resource move is configured in the ARM manifest, not in the TypeSpec API specification. Service owners must configure resource move support in the ARM manifest.
RPC004URI must follow ARM standard guidelines (well-formed GET/PUT/DELETE URI tuples)πŸ”§arm/arm-resource-path-segment-invalid-chars, arm/arm-resource-key-invalid-charsEnforced by TypeSpec ARM resource templates (TrackedResource, ProxyResource) which generate correct URI structures. Path character rules provide additional validation.
RPC005Provisioning state semantics must be followed (terminal/non-terminal states)πŸ”Ά πŸ”„arm/arm-resource-provisioning-stateThe rule checks that provisioningState is an open union containing the correct terminal states (Succeeded, Failed, Canceled). Runtime behavior (transitioning states on PUT/PATCH/DELETE) cannot be linted. Service owners must verify correct provisioning state transitions through integration tests covering resource lifecycle (create, update, delete).
RPC006Tracked resource types must support GET, PUT, PATCH, DELETE & LISTπŸ”Ά 🟣arm/arm-resource-operation, arm/no-resource-delete-operationarm-resource-operation validates operations have correct decorators. no-resource-delete-operation checks resources with createOrUpdate also have delete. Gap: No single rule validates the complete set of required operations (GET, PUT, PATCH, DELETE, ListByRG, ListBySub) for tracked resources β€” a linting rule could and should be added. Service owners should verify the complete operation set through API design review until such a rule exists.
RPC007Resource types must support PATCH for Tagsβœ…arm/arm-resource-patch, arm/patch-envelopearm-resource-patch checks that if a resource has tags, PATCH includes it. patch-envelope validates PATCH includes envelope properties (identity, managedBy, plan, sku, tags).
RPC008PUT, GET, PATCH & LIST must return the same resource schemaβœ…arm/arm-resource-operation-responseDirectly implements RPC 008 β€” validates that PUT, GET, PATCH, and LIST operations all return the same resource schema.
RPC009Use PUT for replace, PATCH for partial update (JSON merge-patch)πŸ”§β€”Enforced by ARM TypeSpec operation templates: ResourceCreateOrUpdate for PUT and ResourceUpdate for PATCH generate the correct patterns.
RPC010Use PUT or PATCH to update a resource, not POST❌ πŸ“ πŸŸ£β€”No rule prevents using POST for what should be a resource update. arm/arm-resource-invalid-action-verb ensures actions use POST/GET verbs but does not check intent. Service owners must verify through API design review that POST is not used for operations that semantically perform a full resource update.
RPC011.aPUT on parent must not implicitly create tracked child resources❌ πŸ“ πŸŸ£β€”No rule detects implicit child resource creation in PUT request bodies. Service owners must review PUT request schemas during API design review to ensure tracked child resources are not implicitly created.
RPC011.bPUT on parent should avoid implicitly creating proxy child resources❌ πŸ“ πŸŸ£β€”Same gap as RPC011.a. This rule is still being refined. Service owners should review PUT request schemas for implicit proxy child creation.
RPC012Secret property semantics (no secrets in GET/PUT/PATCH responses, use POST list* action)πŸ”Ά πŸ“ πŸ”„arm/secret-propChecks properties with sensitive names (password, key, token, etc.) are marked @secret. Service owners must additionally verify that: (1) secrets are omitted from GET/PUT/PATCH responses (runtime integration tests), and (2) secret retrieval is only via POST list* actions (API design review).
RPC013Resource must define a property bag; should include provisioningStateβœ…arm/arm-resource-provisioning-state, arm/arm-resource-invalid-envelope-propertyarm-resource-provisioning-state checks for a properly configured provisioningState. arm-resource-invalid-envelope-property ensures RP-specific properties are inside the properties bag. ARM base types enforce the property bag structure.
RPC014POST action must operate on single resourceπŸ”Ά πŸ“arm/arm-resource-invalid-action-verbValidates that actions use POST or GET verbs. Service owners must verify through API design review that POST actions target individual resource instances, not collections.
RPC015PUT APIs that only return 200 (should also support 201/202 for creation)βœ…arm/arm-put-operation-response-codesValidates that PUT operations have the appropriate status codes including 201 for creation.
RPC016Responses must include id, name, type; RP content inside propertiesβœ…arm/arm-resource-invalid-envelope-property, arm/arm-resource-operation-responsearm-resource-invalid-envelope-property validates envelope properties come from Azure.ResourceManager namespace. ARM base types enforce id, name, type. arm-resource-operation-response ensures consistent schema across operations.
RPC019No resources of other types in response (RBAC violation / info leak)❌ πŸ“ πŸŸ£β€”No rule detects when a response includes full content of resources of different types. Service owners must review response schemas during API design review to ensure responses do not embed full representations of other resource types, which could create RBAC bypass or information leakage. Related to ARG001.
RPC020Circular dependencies between resources (read-only back-references)❌ πŸ“β€”No rule detects writable circular references between resources. Service owners must review resource relationships during API design review to ensure circular dependencies use readOnly back-references, so ARM template dependency ordering can be resolved.
RPC021operationResults must be a top-level resource type❌ πŸ—οΈβ€”/operationResults API placement is an ARM platform pattern, not described in TypeSpec resource provider specs. Service owners must configure this through the ARM platform.
RPC022Identifiers for operationResults must be unique (use GUIDs, not hashes)❌ πŸ—οΈβ€”Identifier generation strategy is a runtime implementation concern internal to ARM. Service owners must ensure their implementation uses GUIDs for operation result identifiers.
RPC023DELETE should always be honored (never reject DELETE on bad state)❌ πŸ”„β€”Whether DELETE is accepted regardless of resource state is a runtime implementation concern. Service owners must verify through runtime tests that DELETE is never rejected due to resource state.
RPC024Prefer header-based async timeout over manifest-based❌ πŸ—οΈβ€”Async timeout configuration is in the ARM manifest, not in the TypeSpec API specification. Service owners must configure this in the ARM manifest.
RPC025201 is the recommended async pattern (201 + provisioningState + Azure-AsyncOperation)πŸ”Ά πŸ”„arm/arm-put-operation-response-codes, arm/lro-location-header, arm/retry-afterPUT response codes, LRO Location header, and Retry-After are checked. Service owners must verify through integration tests that their preferred async pattern follows the 201 + provisioningState + Azure-AsyncOperation recommendation, as no rule specifically enforces this preference over alternatives.
RPC026Resource provider must implement subscription lifecycle contract❌ πŸ—οΈβ€”Subscription lifecycle (register/unregister) is an internal ARM contract, not part of the customer-facing TypeSpec spec. POST /register in operations API is covered by arm/missing-operations-endpoint. Service owners must implement the subscription lifecycle contract as specified by the ARM platform.
RPC027SystemData support (createdBy, createdAt, etc.)πŸ”§β€”Enforced by ARM TypeSpec base types β€” TrackedResource and ProxyResource automatically include systemData in the resource model.
RPC028Async operation tracking URI must follow ARM guidelinesπŸ”Ά πŸ”„arm/lro-location-headerValidates 202 responses include a Location header. Service owners must verify through integration tests that the Location URI format follows ARM guidelines and points to the ARM front door, as the specific URI format is not validated.
RPC029FQDNs must use auto-generated domain name labels (prevent subdomain takeover)❌ πŸ”„β€”Domain label generation strategy is a runtime implementation concern. Service owners must verify through runtime testing that FQDNs use the AzureDNS Deterministic Names library to prevent subdomain takeover.
RPC030Avoid excessive resource type nesting (max 3 levels for tracked)βœ…arm/beyond-nesting-levelsEnsures tracked resources use 3 or fewer levels of nesting.
RPC031Unsupported query parameters (sub, subId, subscription, subscriptionId)❌ πŸ—οΈβ€”ARM proxy behavior for query parameters is handled by the ARM platform. Service owners do not need to take action β€” this is enforced by the ARM front door.
Coverage LevelCountRules
βœ… Fully covered or enforced by templates12RPC004, RPC007, RPC008, RPC009, RPC013, RPC015, RPC016, RPC027, RPC030 (linting); RPC004, RPC009, RPC027 (templates)
πŸ”Ά Partially covered6RPC005 (πŸ”„), RPC006 (🟣), RPC012 (πŸ“ πŸ”„), RPC014 (πŸ“), RPC025 (πŸ”„), RPC028 (πŸ”„)
❌ πŸ—οΈ Not lintable β€” internal ARM infrastructure6RPC003, RPC021, RPC022, RPC024, RPC026, RPC031
❌ πŸ”„ Not lintable β€” service runtime behavior2RPC023, RPC029
❌ πŸ“ Not lintable β€” design guidance5RPC010 (🟣), RPC011.a (🟣), RPC011.b (🟣), RPC019 (🟣), RPC020

The following sections provide a more detailed breakdown of coverage organized by topic area, with links to specific rule documentation.

RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
1.1 Tracked resource paths under subscription/RGRPC-Put-V1-01, RPC-Get-V1-11πŸ”§β€”Enforced by TrackedResource base type, which generates correct path structure automatically.
1.2 Proxy resource pathsβ€”πŸ”§β€”Enforced by ProxyResource base type.
1.3 Resource provider namespace consistencyRPC-Put-V1-06πŸ”§β€”Enforced by @armProviderNamespace decorator which sets the namespace in paths.
1.4 Operations API endpoint requiredRPC-Operations-V1βœ…arm/missing-operations-endpointChecks that every ARM namespace includes an Operations interface.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
2.1 PUT response must be an ARM ResourceRPC-Put-V1-12βœ…arm/arm-resource-operation-response, arm/arm-put-operation-response-codesRPC 008 validates PUT/GET/PATCH/LIST return the same resource schema. PUT response codes are also validated. ARM base types ensure x-ms-azure-resource is set.
2.2 Tracked resources must have all required operationsRPC-Get-V1-01, RPC-Put-V1-01, RPC-Patch-V1-03, RPC-Delete-V1-01πŸ”Ά 🟣arm/arm-resource-operation, arm/no-resource-delete-operationarm-resource-operation validates operations have correct decorators. no-resource-delete-operation checks that resources with createOrUpdate also have delete. Gap: No single rule validates the complete operation set (GET, PUT, PATCH, DELETE, ListByRG, ListBySub) for tracked resources β€” a linting rule could and should be added. Service owners should verify the complete operation set through API design review until such a rule exists.
2.3 Nested resources must have List under parentβ€”βŒ πŸŸ£β€”Gap: No rule validates that nested resources define a List operation under their parent β€” a linting rule could and should be added. Service owners must verify this during API design review until such a rule exists.
2.3 Nesting depth limitβ€”βœ…arm/beyond-nesting-levelsEnsures tracked resources use 3 or fewer nesting levels.
2.3 No embedded nested resources in parent GETARG001❌ πŸ“β€”No rule prevents embedding child resources inline in parent GET response. Service owners must verify during API design review that parent GET responses do not embed full child resources. See also Section 10.1.
2.4 Resource references use fully qualified ARM resource IDsβ€”πŸ”§ πŸ“β€”TypeSpec provides the armResourceIdentifier scalar in Azure.Core for this purpose, which enforces the arm-id format and allows specifying allowed resource types and scopes. However, no linting rule can reliably detect that a plain string property is intended to hold a resource reference β€” that requires domain knowledge. Service owners must use armResourceIdentifier for properties that reference other ARM resources and verify this through API design review. See ARM Resource Types.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
3.1 Resources must expose PUT for creationβ€”πŸ”§β€”Enforced by ARM TypeSpec operation templates (ResourceCreateOrUpdate).
3.1 PUT must be idempotentβ€”βŒ πŸ”„β€”Service runtime behavior β€” cannot be validated through API specification. Service owners must verify PUT idempotency through integration tests that repeat PUT requests and confirm no side effects.
3.2 PUT must not expose secrets in responseβ€”πŸ”Ά πŸ”„arm/secret-propChecks that properties with sensitive names are marked @secret. Service owners must additionally verify that secrets are omitted from PUT responses through response payload inspection in integration tests.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
4.1 PATCH body must not have required propertiesRPC-Patch-V1-10βœ…arm/arm-resource-patchValidates PATCH request body model properties. ARM TypeSpec templates automatically generate separate update models.
4.2 Tracked resource PATCH must support tagsRPC-Patch-V1-03βœ…arm/arm-resource-patch, arm/patch-envelopearm-resource-patch checks tags are included. patch-envelope validates envelope properties (identity, managedBy, plan, sku, tags) match the resource.
4.2 Resources should have updateable propertiesβ€”βœ…arm/empty-updateable-propertiesChecks that resources with update operations have at least one updateable property.
4.3 PATCH must not expose secrets in responseβ€”πŸ”Ά πŸ“ πŸ”„arm/secret-propChecks sensitive property names are marked @secret. Service owners must additionally verify through API design review that secret properties are correctly identified, and through integration tests that secrets are omitted from PATCH responses.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
5.1 DELETE response codes (200, 204, default; 202 for async)RPC-Delete-V1-01, RPC-Async-V1-09βœ…arm/arm-delete-operation-response-codesValidates correct status codes for both sync and async DELETE operations.
5.2 DELETE must not have a request bodyβ€”πŸ”§β€”Enforced by ARM TypeSpec operation templates which do not include a body parameter for DELETE.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
6.1 LRO 202 must include Location or Azure-AsyncOperation headerRPC-Async-V1βœ…arm/lro-location-headerValidates 202 responses include a Location header.
6.1 LRO 200/201 response must have a schemaRPC-Async-V1βœ…arm/no-response-bodyChecks that non-204 success responses have a body and 202/204 responses do not.
6.1 LRO Retry-After headerβ€”βœ…arm/retry-afterChecks that LRO responses (201/202) include a Retry-After header.
6.2 Operation results as root-level resourcesβ€”βŒ πŸ—οΈβ€”Internal ARM infrastructure concern β€” /operationResults placement is an ARM platform pattern, not described in TypeSpec specs. Service owners must configure this through the ARM platform.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
7.1 No secrets in GET/PUT/PATCH responsesβ€”πŸ”Ά πŸ“ πŸ”„arm/secret-propValidates that properties with sensitive names are marked @secret. The @secret decorator drives correct code generation, but the rule does not verify secrets are omitted from specific response types. Service owners must verify through API design review that all sensitive properties are identified, and through integration tests that secrets are excluded from GET/PUT/PATCH responses.
7.1 Secret retrieval via POST list* actionβ€”βŒ πŸ“β€”No rule validates that secrets are exposed only via POST list* actions for granular RBAC control. Service owners must verify this design pattern through API design review.
7.2 x-ms-secret annotationRPC-v1-13βœ…arm/secret-propChecks that sensitive properties are annotated with @secret, which generates x-ms-secret: true.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
8.1 Prefer enums over booleansβ€”βŒ πŸ“β€”Design guidance requiring human judgment. Booleans are sometimes appropriate. Service owners must evaluate during API design review.
8.2 Use objects instead of strings for structured valuesβ€”βŒ πŸ“β€”Design guidance requiring human judgment. Service owners must evaluate during API design review.
8.3 Use enums for finite value setsβ€”πŸ”Ά πŸ“core/no-enumAzure Core recommends extensible unions over enums, which aligns with ARM’s preference for extensible types. Service owners should verify through API design review that free-form strings that should be constrained are modeled as extensible unions.
8.4 Visibility and mutabilityβ€”πŸ”Ά πŸ“core/key-visibility-requiredChecks key properties have visibility settings. Service owners must verify through API design review that create-only, read-only, and other mutability constraints are properly annotated on all properties.
8.5 Avoid writable circular dependenciesβ€”βŒ πŸ“β€”No rule detects writable circular references between resources. Service owners must review resource dependency graphs during API design review to ensure circular dependencies use readOnly back-references for correct ARM template dependency ordering.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
9.1–9.2 When to use inline vs. nested resourcesβ€”βŒ πŸ“β€”Design guidance requiring human judgment based on lifecycle, RBAC, and collection size. Service owners must make this decision during API design review.
9.3 Never model both inline and nestedβ€”βŒ πŸ“β€”No rule detects when a collection is modeled as both an inline array property and a nested resource type. Service owners must verify during API design review that each entity is modeled exclusively as either inline or nested.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
10.1 No embedded child resources in parent GET (ARG001)ARG001❌ πŸ“β€”No rule prevents embedding child resources or child counts in parent resource GET responses. Service owners must verify during API design review that parent GET responses do not include full child resource representations.
10.2 No customer data in control plane properties (ARG002)ARG002❌ πŸ”„β€”Data classification concern β€” cannot be reliably detected through API specification linting. Service owners must verify through data classification review that control plane properties do not contain customer data.
10.3 Do not remove properties between API versions (ARG003)ARG003πŸ”Άcore/non-breaking-versioningChecks for backward compatible versioning changes. Service owners should additionally verify through API version comparison testing that no properties are removed between versions, as the rule may not catch all scenarios.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
11.1 Uniform versioning within a serviceβ€”πŸ”§β€”Enforced by TypeSpec versioning model β€” all resource types in a namespace share the same version enum.
11.2 Incremental version progressionβ€”βŒ πŸŸ£β€”Gap: GA versions must have a later date than preview. Since versions are represented as an enum type in TypeSpec, a linting rule could detect incorrect versioning patterns. Service owners must verify version progression through their release process and CI/CD pipeline checks until such a rule exists.
API version parameter requiredβ€”βœ…core/operation-missing-api-version, arm/arm-resource-operationBoth rules validate operations include an api-version parameter.
Version format validationβ€”βœ…arm/arm-resource-invalid-version-formatChecks that version strings use valid ARM version formats.
RPC GuidelineRPC ID(s)CoverageTypeSpec Rule(s)Notes
12.1 POST actions must use POST or GET verbsβ€”βœ…arm/arm-resource-invalid-action-verbValidates that action operations use only POST or GET HTTP verbs.
12.1 POST response codesβ€”βœ…arm/arm-post-operation-response-codesValidates correct status codes for POST operations.
12.2 POST to create resourcesβ€”βŒ πŸ“β€”POST creation is not allowed for ARM services. This constraint is not detectable by examining the API description alone. Service owners must verify through API design review that POST is not used for resource creation in ARM resource provider APIs.

The following TypeSpec linting rules enforce ARM conventions that are not explicitly called out as individual RPC guidelines but support overall ARM compliance:

TypeSpec RuleDescription
arm/arm-common-types-versionRequires specifying the ARM common-types version using @armCommonTypesVersion.
arm/arm-no-recordPrevents use of Record types for ARM resources, which produce additionalProperties in OpenAPI.
arm/arm-resource-duplicate-propertyWarns about duplicate properties in resource definitions.
arm/arm-resource-interface-requires-decoratorRequires @armResourceOperations decorator on resource interfaces.
arm/arm-resource-name-patternRequires a pattern restriction on resource name parameters.
arm/improper-subscription-list-operationEnsures tenant and extension resources don’t define list-by-subscription operations.
arm/missing-x-ms-identifiersRequires array properties to describe identifying properties with x-ms-identifiers.
arm/no-empty-modelPrevents ARM properties with type: object that don’t reference a model definition.
arm/unsupported-typeChecks for unsupported ARM types.

Rules Not Enforceable Through Linting β€” Service Owner Responsibility

Section titled β€œRules Not Enforceable Through Linting β€” Service Owner Responsibility”

The following RPC rules cannot be validated through API specification linting. Service owners are responsible for verifying compliance through the mechanisms described below.

These rules describe internal ARM platform concerns that are configured through the ARM manifest or other ARM platform mechanisms, not through the TypeSpec API specification.

RPC RuleDescriptionHow to Verify
RPC003Tracked resource types must support moveConfigure resource move support in the ARM manifest.
RPC021operationResults must be a top-level resource typeConfigure through the ARM platform.
RPC022Identifiers for operationResults must be unique (use GUIDs)Verify in service implementation that operation result identifiers use GUIDs.
RPC024Prefer header-based async timeout over manifest-basedConfigure in the ARM manifest.
RPC026Resource provider must implement subscription lifecycle contractImplement the subscription lifecycle contract as specified by the ARM platform.
RPC031Unsupported query parametersEnforced by the ARM front door β€” no service action required.

These rules describe runtime behavior that can only be validated through testing, not through API specification.

RPC RuleDescriptionHow to Verify
RPC005 (runtime aspects)Provisioning state transitions on PUT/PATCH/DELETEIntegration tests covering resource lifecycle (create, update, delete) and validating terminal states (Succeeded, Failed, Canceled).
RPC023DELETE should always be honored (never reject on bad state)Runtime tests confirming DELETE is accepted regardless of resource state.
RPC029FQDNs must use auto-generated domain name labelsRuntime tests verifying FQDNs use the AzureDNS Deterministic Names library to prevent subdomain takeover.
3.1PUT must be idempotentIntegration tests repeating PUT requests and confirming no side effects.
10.2 (ARG002)No customer data in control plane propertiesData classification review of control plane properties.

❌ πŸ“ Design Guidance Requiring Human Judgment

Section titled β€œβŒ πŸ“ Design Guidance Requiring Human Judgment”

These rules require domain knowledge or design judgment that automated linting cannot provide. Service owners must verify compliance through API design reviews.

RPC RuleDescriptionWhat to Look For in Design Review
RPC010Use PUT or PATCH to update a resource, not POSTVerify POST is not used for operations that semantically update a resource.
RPC011.aPUT on parent must not implicitly create tracked child resourcesReview PUT request schemas for properties that would create child resources as a side effect.
RPC011.bPUT on parent should avoid implicitly creating proxy child resourcesSame as RPC011.a for proxy child resources.
RPC019No resources of other types in response (RBAC/info leak)Review response schemas to ensure they do not embed full representations of other resource types.
RPC020Circular dependencies between resourcesReview resource dependency graphs to ensure circular dependencies use readOnly back-references.
2.3No embedded nested resources in parent GETVerify parent GET responses do not embed full child resource representations.
2.4Resource references use fully qualified ARM resource IDsVerify all properties referencing other ARM resources use the armResourceIdentifier scalar.
7.1Secret retrieval via POST list* action onlyVerify secrets are exposed only via POST list* actions for granular RBAC control.
8.1Prefer enums over booleansEvaluate whether booleans should be replaced with extensible enums.
8.2Use objects instead of strings for structured valuesEvaluate whether string properties contain structured data that should be modeled as objects.
9.1–9.2When to use inline vs. nested resourcesEvaluate lifecycle, RBAC, and collection size to choose between inline properties and nested resources.
9.3Never model both inline and nestedVerify each entity is modeled exclusively as either inline or nested.
10.1 (ARG001)No embedded child resources in parent GETVerify parent GET responses do not include full child resource representations.
12.2POST to create resourcesPOST creation is not allowed for ARM services. Verify POST is not used for resource creation in ARM APIs. Not detectable from API description alone.

Partially Covered Rules β€” Service Owner Verification Required

Section titled β€œPartially Covered Rules β€” Service Owner Verification Required”

The following rules are partially covered by TypeSpec linting, but service owners must verify the uncovered aspects as described below.

RPC RuleWhat Linting CoversWhat Service Owners Must Verify
RPC005 πŸ”„arm-resource-provisioning-state checks that provisioningState is an open union containing the correct terminal states (Succeeded, Failed, Canceled).Correct provisioning state transitions during resource lifecycle (create, update, delete). Verify through integration tests.
RPC006 🟣arm-resource-operation validates operation decorators. no-resource-delete-operation checks delete exists with createOrUpdate.The complete operation set (GET, PUT, PATCH, DELETE, ListByRG, ListBySub) β€” this is an actionable gap where a linting rule could be added. Verify through API design review until then.
RPC012 πŸ“ πŸ”„secret-prop checks sensitive property names are marked @secret.(1) Secrets are omitted from GET/PUT/PATCH responses β€” verify through integration tests inspecting response payloads. (2) Secret retrieval is only via POST list* actions β€” verify through API design review.
RPC014 πŸ“arm-resource-invalid-action-verb validates POST/GET verb usage.POST actions target individual resource instances, not collections. Verify through API design review.
RPC025 πŸ”„PUT response codes, LRO Location header, and Retry-After are validated.The preferred async pattern (201 + provisioningState + Azure-AsyncOperation) is followed. Verify through integration tests.
RPC028 πŸ“LRO Location header presence is validated for 202 responses.The Location URI format follows ARM guidelines and points to the ARM front door. Verify through API design review and integration tests.
7.1 πŸ“ πŸ”„secret-prop validates sensitive property annotations.All sensitive properties are correctly identified β€” verify through API design review. Secrets are excluded from GET/PUT/PATCH response payloads β€” verify through integration tests.
8.3 πŸ“no-enum recommends extensible unions over fixed enums.Free-form strings that should be constrained are modeled as extensible unions. Verify through API design review.
8.4 πŸ“key-visibility-required checks key property visibility.Create-only, read-only, and other mutability constraints are properly annotated on all properties. Verify through API design review.
10.3 (ARG003) πŸ“ πŸ”„non-breaking-versioning checks backward compatible versioning.Breaking changes at the API level can be checked through API description comparison. Runtime breaking changes require runtime testing to detect.

Actionable Gaps β€” Where Future Linting Rules Could Help

Section titled β€œActionable Gaps β€” Where Future Linting Rules Could Help”

The following areas are customer-facing API concerns where new TypeSpec linting rules could potentially be added to improve automated coverage. Until such rules are implemented, service owners must verify these through API design reviews.

AreaRPC Rule(s)Gap DescriptionPotential Linting Approach
🟣 Complete operation setRPC006, 2.2No single rule validates that tracked resources have all required operations (GET, PUT, PATCH, DELETE, ListByRG, ListBySub).A rule could check each tracked resource type against the required operation set and report missing operations.
🟣 Nested resource List2.3No rule validates that nested/child resources define a List operation scoped to their parent.A rule could verify each child resource has a List operation at the parent scope.
🟣 Version progression11.2No rule validates that GA versions have a later date than preview versions.Since versions are represented as an enum type in TypeSpec, a rule could check that GA version date strings are chronologically later than their corresponding preview versions.
🟣 Implicit child creationRPC011.a, RPC011.bNo rule detects implicit child resource creation in PUT request bodies.A rule could flag PUT request schemas that contain arrays or properties matching known child resource type shapes.
🟣 POST vs. PUT/PATCH intentRPC010No rule detects when POST is used for what should be a resource update.Difficult to automate β€” would require heuristics on POST operation naming and body schemas.
🟣 Cross-resource type resp.RPC019No rule detects when a response embeds full content of other resource types.A rule could flag response models containing properties typed as other ARM resource types.