0.74.0
0.74.0
Section titled “0.74.0”Features
Section titled “Features”@azure-tools/typespec-azure-core
Section titled “@azure-tools/typespec-azure-core”-
#5710 Add
@azureServiceConfigurationsto pair named endpoints with OAuth URLs and scopes, authored as value records with constrainedtyperef(...)references to authentication types and endpoint parameter models. Enable the experimentaltyperefcompiler feature to use these references. Require apublicdefault and preserve AND groups and credential alternatives. -
#5959 Add the
list-operation-missing-200-responselint rule to require an HTTP 200 response on operations marked with@list, including data-plane and POST operations. -
#5507 Add the
no-redundant-summarylint rule to warn when a declaration’s summary repeats its documentation. -
#5986 Add the
no-request-bodylint rule to report GET and DELETE operations with request bodies across data-plane and Azure Resource Manager APIs.@getop read(@body filter: {name: string;},): string; // warning: GET request body@deleteop remove(@body options: {force: boolean;},): void; // warning: DELETE request body -
#5782 Add
@lroOperationIdandSdkLroServiceMetadata.operationIdfor legacy services that expose server-issued operation identity through a linked status-monitor URI, its response body, or both. The orderedSdkLroOperationIdMetadataentries preserve the selected SDK parameter or effective response property, withpropertySegmentsidentifying the body access path, including inherited properties and@hierarchyBuildingreplacements. Active selections are validated during LRO processing; unused or out-of-scope annotations have no effect. Includes emitter scopes and representative Spector scenarios. -
#5546 Separate native LRO protocol analysis from client-result selection. Add
getLroProtocolMetadatainAzure.Corewith protocol facts grouped into required initial, polling, and completion objects alongside the top-level operation. Route TCGC result selection and native model usage through these facts, preserving all leaf field semantics, the flatgetLroMetadatacontract, and existing SDK result contracts. -
#5973 Add the
use-known-enum-defaultlinter rule to warn when an extensible enum’s default is not one of its declared values.
@azure-tools/typespec-azure-resource-manager
Section titled “@azure-tools/typespec-azure-resource-manager”-
#5451 Add the
use-standard-errorlint rule, promoting the LintDiffLroErrorContentcheck to help ARM APIs use consistent error responses. Operations other than HEAD must declare an@errorresponse and useAzure.ResourceManager.CommonTypes.ErrorResponsefor error payloads.Error bodies must use the standard model directly, including through aliases or an explicit
@bodyproperty. -
#5638 Add the opt-in
no-empty-post-responselint rule requiring a response payload for synchronous ARM resource POST 200 responses. -
#5526 Add the
no-repeated-path-infolint rule to warn when ARM PUT resource properties repeat path or query parameter names, honoring JSON-encoded property names and including concrete operations inherited from generic interfaces.This complements
arm-resource-duplicate-property, which checks duplication of resource envelope property names rather than URI parameter names. -
#5878 Add the
no-resource-name-conflictARM linter rule to detect duplicate logical resource names across services. Keep the rule opt-in in the Azureresource-managerruleset. Document explicit resource naming for standard operations, specific extensions, legacy templates, and different scopes. -
#5766 Add the
private-endpoint-apis-missinglint rule to require complete registered ARM private endpoint API sets. -
#5654 Add the
resource-missing-readlint rule requiring a read operation for ARM resources with create or update operations. -
#5681 Add the
scope-path-segment-casinglint rule to warn on noncanonicalsubscriptionsandresourceGroupspath segments. -
#5550 Add the
use-resource-path-for-putlint rule to check that ARM PUT paths end in resource type/name pairs. -
#5684 Add the opt-in
use-scope-for-extension-routingrule for managed RPaaS extension-routing contracts. The rule requires arbitrary-scope paths rather than hardcoded parent paths. ARM libraryalldoes not enable this RPaaS-specific policy; specific-parent extension paths remain supported for ordinary ARM contracts. -
#5859 Add the
use-scope-path-standard-namelint rule for standard ARM resource-group and subscription path parameter names. -
#5652 Add the
lro-missing-polling-metadatalint rule, consolidatingLroExtensionandXMSLongRunningOperationProperty. Require native polling metadata for PATCH and marked provider/collection POST operations returning202, and for PUT/PATCH/POST/DELETE operations whose200,201,202, or204responses containLocationorAzure-AsyncOperationheaders.Use asynchronous ARM templates or preserve supported semantic LRO headers. Check concrete operations within explicit service namespaces, including nested namespaces, without a global fallback. Report once on the authored operation even when both checks apply, and resolve each eligible operation once across overlapping service declarations, including compliant operations.
The rule is disabled in the central resource-manager ruleset and included in the ARM library’s compiler-generated
allruleset. -
#5974 Add
no-resource-duplicatesto warn whenresolveArmResourcesreturns distinct records with the same case-insensitive resource type and instance path, retaining path parameter names. Register the rule disabled in the centralresource-managerruleset pending fixes to existing service specifications; it is available through explicit enablement or the ARM library’sallruleset. -
#5502 Add the
no-tags-on-proxy-resourcelint rule for detecting unsupported envelope tags on non-tracked ARM resources, with a removal code fix for directly declared envelope tags. Resource-specific properties bags are not checked. Document how to remove unsupported tags or use theTrackedResourcetemplate when ARM tags are required. -
#5431 Add selected-version and multi-service views plus dependency-neutral logical name customization to
resolveArmResources. Callers can select independent namespace/version references for services that share an ARM provider string and receive one combined provider result. Deferred naming formulas apply consumer model names to every model-derived part of a resource name while preserving explicit names and structural grouping; complete resource names can be overridden per occurrence, synthetic resources can be identified by default name or ARM instance path, and returned resource kinds are presented consistently asTrackedorProxy. The existing no-options call continues to return the multi-version declaration view, with an ARM emitter how-to covering resource extraction, service/version discovery, selected versions, and TCGC client naming. -
#5892 Extend
no-reserved-resource-propertyto rejectsystemDatain ARM resource properties bags, keeping system metadata in the resource envelope. This covers the direct resource-bag restriction fromSystemDataInPropertiesBagand applies wherever the existing rule is enabled, including the recommended resource-manager ruleset. -
#5556 Add the
use-standard-response-codesARM lint rule combining the SwaggerNoErrorCodeResponsesandGetResponseCodeschecks. Concrete HTTP endpoints may only use200,201,202,204, anddefault, including operations without service or provider namespace metadata. GET operations inside services must include200and may only add202ordefault, with one warning per invalid GET operation.
@azure-tools/typespec-client-generator-core
Section titled “@azure-tools/typespec-client-generator-core”-
#5927 Add
propertySegmentstoSdkLroStatusMetadataso emitters can locate selected metadata values relative topollingInfo.responseModel, following the existing typed segment convention. Segments preserve SDK and wire names and reference the retained property after hierarchy reconciliation. -
#5853 Add the
@dynamicModeldecorator in Azure.ClientGenerator.Core to provide opt-in dynamic-model metadata for models or namespaces, with optional language scoping. Dynamic-model generation is currently supported only by the C# emitter; the shared decorator provides opt-in metadata pending emitter adoption and does not itself generate JSON Patch fields. -
#5782 Add
@lroOperationIdandSdkLroServiceMetadata.operationIdfor legacy services that expose server-issued operation identity through a linked status-monitor URI, its response body, or both. The orderedSdkLroOperationIdMetadataentries preserve the selected SDK parameter or effective response property, withpropertySegmentsidentifying the body access path, including inherited properties and@hierarchyBuildingreplacements. Active selections are validated during LRO processing; unused or out-of-scope annotations have no effect. Includes emitter scopes and representative Spector scenarios. -
#5677 Add the scoped, property-level
@lroStatusMetadatadecorator with exact typed SDK metadata for auxiliary LRO status-monitor values and a latest-response lifecycle contract for poller or operation state, including failure and cancellation.Multiple declarations on one property may use disjoint emitter scopes; overlapping scopes are diagnosed once at declaration time.
Access overrides now run after legacy hierarchy reconciliation and status metadata graph promotion, so overrides also apply to types materialized by those steps. This changes the processing order for all TCGC models, not only LROs.
-
#5955 Add
no-repeated-client-nameto warn when a common SDK method name repeats its owning subclient name, covering the SDK naming intent ofOperationIdNounVerb. Renaming a shipped SDK method can break callers. -
#5591 Add the
no-operation-group-name-conflictlint rule to warn when an interface or namespace containing operations has the same name as a type declared in its parent namespace. Check common and language-specific names without constructing SDK clients. -
#5743 Convert inline-discriminated unions with explicit nominal model hierarchies to polymorphic SDK models by default. Set
convertDiscriminatedUnionsToModels: falseincreateSdkContextto preserve union representations. Ordinary unions and object-envelope unions retain their existing behavior. -
#5546 Separate native LRO protocol analysis from client-result selection. Add
getLroProtocolMetadatainAzure.Corewith protocol facts grouped into required initial, polling, and completion objects alongside the top-level operation. Route TCGC result selection and native model usage through these facts, preserving all leaf field semantics, the flatgetLroMetadatacontract, and existing SDK result contracts. -
#5710 Expose paired endpoint and OAuth configurations through
client.clientInitialization.serviceConfigurationswithout changing existing HTTP-based client initialization. Each client reads the catalog declared on its first service, with the requiredpublicserver first; SDK-namespace catalogs do not override it. Multi-service clients use the first service’s endpoint, authentication, and configuration catalog without requiring equality across services. -
#5601 Load unified YAML examples through the shared examples resolver and normalize them into the existing SDK example model, while preserving legacy JSON loading.
-
#5648 Expose a union’s explicit
extendsconstraint throughSdkUnionType.baseType. The base type receives the union’s usage, access, and serialization information. TCGC leavesbaseTypeundefined when variants only happen to share a common ancestor.model PetBase {name: string;}model Cat extends PetBase {meow: boolean;}model Dog extends PetBase {bark: boolean;}union Pet extends PetBase {cat: Cat,dog: Dog,} -
#5734 Infer enum value types from explicit scalar
extendsconstraints on unions, preserving the declared scalar precision for known variants without changing whether the union is fixed or extensible. -
#5727 Expose union variant names and SDK types through
SdkUnionType.variants, an orderedMap<string | symbol, SdkType>matching the compiler’s variant keys. Named variants use their declared string names, unnamed/default variants retain their compiler symbol keys, and synthesized variants use unique symbols. The existingvariantTypesproperty retains the same type references and ordering. -
#5673 Consolidate
use-create-for-put, PATCH naming guidance, and DELETE naming guidance into the opt-inuse-correct-verblint rule. Common SDK method names must start withcreatefor PUT,updatefor PATCH, anddeletefor DELETE, case-insensitively. Replaceuse-create-for-putin linter configuration and suppressions withuse-correct-verb; enabling it also checks PATCH and DELETE. Renaming an already-shipped SDK method may be a breaking change. -
#5561 Add the
use-union-hierarchylinter rule to require non-string named unions to declare anextendsconstraint and model variants to inherit from the declared base and belong to only one model-based union hierarchy, enabled by theclient-sdkruleset. String unions do not requireextends.
@azure-tools/typespec-azure-rulesets
Section titled “@azure-tools/typespec-azure-rulesets”- #5878 Add the
no-resource-name-conflictARM linter rule to detect duplicate logical resource names across services. Keep the rule opt-in in the Azureresource-managerruleset. Document explicit resource naming for standard operations, specific extensions, legacy templates, and different scopes. - #5974 Add
no-resource-duplicatesto warn whenresolveArmResourcesreturns distinct records with the same case-insensitive resource type and instance path, retaining path parameter names. Register the rule disabled in the centralresource-managerruleset pending fixes to existing service specifications; it is available through explicit enablement or the ARM library’sallruleset. - #5561 Add the
use-union-hierarchylinter rule to require non-string named unions to declare anextendsconstraint and model variants to inherit from the declared base and belong to only one model-based union hierarchy, enabled by theclient-sdkruleset. String unions do not requireextends.
@azure-tools/azure-http-specs
Section titled “@azure-tools/azure-http-specs”- #5677 Add Content Understanding and Language-shaped HTTP scenarios for typed LRO status metadata, including initial values, changing progress metadata, and auxiliary errors on failure.
- #5710 Add Public and Government authentication configuration scenarios that require a local OAuth client-credentials exchange followed by a request to the paired service endpoint. Validate
grant_type,client_id,client_secret, and cloud-specificscopevalues, and require the returned bearer token for the selected configuration. - #5782 Add
@lroOperationIdandSdkLroServiceMetadata.operationIdfor legacy services that expose server-issued operation identity through a linked status-monitor URI, its response body, or both. The orderedSdkLroOperationIdMetadataentries preserve the selected SDK parameter or effective response property, withpropertySegmentsidentifying the body access path, including inherited properties and@hierarchyBuildingreplacements. Active selections are validated during LRO processing; unused or out-of-scope annotations have no effect. Includes emitter scopes and representative Spector scenarios.
Bug Fixes
Section titled “Bug Fixes”@azure-tools/typespec-azure-core
Section titled “@azure-tools/typespec-azure-core”- #5677 Include the status monitor error property in LRO metadata resolved from an implicit polling location.
- #5975 Fix
no-generic-numericto report generic numeric array elements and dictionary values, including nested combinations of arrays and records, and inline operation parameters such as query parameters. - #5522 Report nonempty anonymous request body models passed through templates with no-unnamed-types, while preserving authentication and other non-payload template configuration exemptions.
@azure-tools/typespec-azure-resource-manager
Section titled “@azure-tools/typespec-azure-resource-manager”- #5866 Fix
no-response-bodyto reject payloads on DELETE 200 responses and continue checking 202/204 bodies after a bodyless DELETE or POST 200 response. - #5723 Honor invalid envelope property suppressions on shared source properties and concrete resource consumers.
- #5976 Fix
resolveArmResourceslist association: match exact parent collections for all resources, subscription collections only for resource-group-scoped tracked resources, and explicit resource names across scopes. Attach matching lists to every eligible identity and retain unmatched lists inproviderOperationswithout creating resources. - #6000 Revert the latest-version requirement in
arm-common-types-version. Explicitly selected older ARM common-types versions are accepted again, while missing explicit version configuration still produces a warning. - #5582 Consolidate list response field names and array validation in
list-response-envelope. Require an array-valuedvalueand the standardnextLinkfield, including inherited properties and paged list actions. Remove the separatelist-response-value-arrayrule.
@azure-tools/typespec-client-generator-core
Section titled “@azure-tools/typespec-client-generator-core”- #5965 Support
exact()in@clientLocationstring targets to preserve operation group casing in generated clients. Exact and ordinary references to the same group share a single client. - #5960 Exclude array constraints from
use-union-hierarchymodel inheritance and ownership checks while retaining the explicitextendsrequirement and compiler array element validation. - #5637 Preserve the source service API version for operations moved across services with
@clientLocation. - #5872 Preserve original enum values and expose JSON/XML
@encodedNamenames in enum members’serializationOptions, including flattened enums and example matching, without changing spec discriminator tags. - #5931 Fix missing fields in query-object examples.
- #5874 Fix
replaceResponseWithBytesto expose raw response bytes instead of base64-encoded bytes while preserving the original HTTP response metadata. - #5835 Match unified YAML example operation keys case-insensitively, like legacy JSON examples, while retaining raw example envelopes. Append explicit YAML example IDs to SDK example file paths as
#id.
@azure-tools/typespec-azure-rulesets
Section titled “@azure-tools/typespec-azure-rulesets”- #5883 Enable
no-query-in-postanduse-model-request-bodyby default in theresource-managerruleset.
@azure-tools/azure-http-specs
Section titled “@azure-tools/azure-http-specs”- #5656 Select ARM common types v5 for the common-properties Spector scenarios so inherited resource IDs use
armResourceIdentifier.