0.71.0
0.71.0
Section titled “0.71.0”Breaking Changes
Section titled “Breaking Changes”@azure-tools/typespec-azure-resource-manager
Section titled “@azure-tools/typespec-azure-resource-manager”- #5197 Remove
modelDeploymentReffrom the experimental Agent base typeAgentDefinitionAppliancemodel. The appliance owns the entire agent definition, so the property is now Platform-only and remains available onAgentDefinitionPlatform. As a resultAgentDefinitionAppliancetakes a single template parameter (AgentDefinitionAppliance<HasInstructions>instead ofAgentDefinitionAppliance<HasModelDeploymentRef, HasInstructions>), andAgentPropertiesAppliance.definitionis read-only again since it no longer needs to carry a client-writable field.
Features
Section titled “Features”@azure-tools/typespec-azure-core
Section titled “@azure-tools/typespec-azure-core”- #5109 Add
no-openapi-client-extensionslinter rule that flags use of the@typespec/openapi@extensiondecorator to emit client-alteringx-ms-*/x-nullableOpenAPI extensions (e.g.x-ms-long-running-operation,x-ms-pageable,x-ms-enum,x-ms-client-name,x-ms-secret). These extensions only affect the OpenAPI output, so other emitters produce an incorrect representation of the API; use the equivalent TypeSpec construct instead. - #4891 Add built-in support for Azure service groups as extension resource targets and ARM resource identifier scopes.
- #4880 Replace the
no-unnamed-unionlinter rule withno-unnamed-typesin@azure-tools/typespec-azure-core. The new rule flags anonymous models in addition to unnamed unions, walking the type graph from operations to detect anonymous models on the client surface. Theno-unnamed-typesrule has been removed from@azure-tools/typespec-client-generator-core.
@azure-tools/typespec-azure-resource-manager
Section titled “@azure-tools/typespec-azure-resource-manager”-
#4892 Add the experimental Relationship base type for Azure Resource Manager extension resources.
RelationshipPropertiesprovides thebaseTypesdescriptor, source and target resource and tenant identifiers, and provisioning state. Resource providers can extend this property bag with relationship-specific information and expose the relationship against any ARM resource scope.Example of creating a dependency relationship with RP-specific metadata and operations:
using Azure.ResourceManager;using Azure.ResourceManager.BaseTypes.Relationships;model DependencyOfMetadata {sourceType: string;targetType: string;description?: string;}model DependencyOfProperties is RelationshipProperties {metadata: DependencyOfMetadata;}#suppress "@azure-tools/typespec-azure-resource-manager/basetypes-experimental" "Experimental BaseTypes"model DependencyOf is Relationship<DependencyOfProperties> {...ResourceNameParameter<Resource = DependencyOf,KeyName = "relationshipName",SegmentName = "dependencyOf",NamePattern = "^[a-zA-Z0-9_.-]{1,64}$">;}interface DependencyOfOps<Scope extends Azure.ResourceManager.Foundations.SimpleResource> {get is Extension.Read<Scope, DependencyOf>;create is Extension.CreateOrReplaceAsync<Scope, DependencyOf>;update is Extension.CustomPatchAsync<Scope,DependencyOf,Azure.ResourceManager.Foundations.ResourceUpdateModel<DependencyOf, DependencyOfProperties>>;delete is Extension.DeleteWithoutOkAsync<Scope, DependencyOf>;list is Extension.ListByTarget<Scope, DependencyOf>;} -
#4891 Add built-in support for Azure service groups as extension resource targets and ARM resource identifier scopes.
-
#5169 Adding a new billing-data common type. This provides standardization of billing properties in e.g. prepaid resource types.
-
#4808 Split
arm-resource-operationlint rule: adduse-operation-decorator,use-api-version, anduse-interfaceas separate rules replacing the original combined rule.
@azure-tools/typespec-client-generator-core
Section titled “@azure-tools/typespec-client-generator-core”- #4867 Add
csharp-model-suffixandcsharp-use-standard-acronymslinter rules for C# SDK model naming. - #4977 Added
versionsEnumfield toSdkClientTypeproviding a direct reference from each client to its Versions enum. This enables code generators to properly map clients to their version enums, especially for mixed api-version scenarios. - #5101 Add warning diagnostic when
@clientDefaultValuevalue type does not match the property type - #4880 Replace the
no-unnamed-unionlinter rule withno-unnamed-typesin@azure-tools/typespec-azure-core. The new rule flags anonymous models in addition to unnamed unions, walking the type graph from operations to detect anonymous models on the client surface. Theno-unnamed-typesrule has been removed from@azure-tools/typespec-client-generator-core. - #4882 add
sseMetadatawith per-event information for server-sent event (SSE) streams
@azure-tools/typespec-azure-rulesets
Section titled “@azure-tools/typespec-azure-rulesets”-
#4867 Add
csharp-model-suffixandcsharp-use-standard-acronymslinter rules for C# SDK model naming. -
#5109 Add
no-openapi-client-extensionslinter rule that flags use of the@typespec/openapi@extensiondecorator to emit client-alteringx-ms-*/x-nullableOpenAPI extensions (e.g.x-ms-long-running-operation,x-ms-pageable,x-ms-enum,x-ms-client-name,x-ms-secret). These extensions only affect the OpenAPI output, so other emitters produce an incorrect representation of the API; use the equivalent TypeSpec construct instead. -
#4892 Add the experimental Relationship base type for Azure Resource Manager extension resources.
RelationshipPropertiesprovides thebaseTypesdescriptor, source and target resource and tenant identifiers, and provisioning state. Resource providers can extend this property bag with relationship-specific information and expose the relationship against any ARM resource scope.Example of creating a dependency relationship with RP-specific metadata and operations:
using Azure.ResourceManager;using Azure.ResourceManager.BaseTypes.Relationships;model DependencyOfMetadata {sourceType: string;targetType: string;description?: string;}model DependencyOfProperties is RelationshipProperties {metadata: DependencyOfMetadata;}#suppress "@azure-tools/typespec-azure-resource-manager/basetypes-experimental" "Experimental BaseTypes"model DependencyOf is Relationship<DependencyOfProperties> {...ResourceNameParameter<Resource = DependencyOf,KeyName = "relationshipName",SegmentName = "dependencyOf",NamePattern = "^[a-zA-Z0-9_.-]{1,64}$">;}interface DependencyOfOps<Scope extends Azure.ResourceManager.Foundations.SimpleResource> {get is Extension.Read<Scope, DependencyOf>;create is Extension.CreateOrReplaceAsync<Scope, DependencyOf>;update is Extension.CustomPatchAsync<Scope,DependencyOf,Azure.ResourceManager.Foundations.ResourceUpdateModel<DependencyOf, DependencyOfProperties>>;delete is Extension.DeleteWithoutOkAsync<Scope, DependencyOf>;list is Extension.ListByTarget<Scope, DependencyOf>;} -
#4808 Split
arm-resource-operationlint rule: adduse-operation-decorator,use-api-version, anduse-interfaceas separate rules replacing the original combined rule. -
#4880 Replace the
no-unnamed-unionlinter rule withno-unnamed-typesin@azure-tools/typespec-azure-core. The new rule flags anonymous models in addition to unnamed unions, walking the type graph from operations to detect anonymous models on the client surface. Theno-unnamed-typesrule has been removed from@azure-tools/typespec-client-generator-core.
@azure-tools/azure-http-specs
Section titled “@azure-tools/azure-http-specs”- #4959 Add e2e scenario for
@clientApiVersionsdecorator to verify clients can send api-version from an extended client enum. - #4891 Add built-in support for Azure service groups as extension resource targets and ARM resource identifier scopes.
- #4632 Add tests for ARM
getLro,postActionPaging,markAsPageable,postPagingLroWithBody,routedGet, andcreateOrReplaceOptionalBody
Bug Fixes
Section titled “Bug Fixes”@azure-tools/typespec-azure-core
Section titled “@azure-tools/typespec-azure-core”- #5109 The
no-openapirule no longer flags the@extensiondecorator. Client-alteringx-ms-*extensions emitted through@extensionare handled by theno-openapi-client-extensionsrule instead.
@azure-tools/typespec-azure-resource-manager
Section titled “@azure-tools/typespec-azure-resource-manager”- #4904 Constrain the
baseTypefield of the experimentalBaseTypeInfoto a newBaseTypeextensible enum (a union ofAgentandRelationshipwith astringvariant) instead of a free-formstring, following the Azureno-enum/no-closed-literal-unionconventions. - #5100 Refine the experimental Agent base type input model: add an
inputproperty toConversationProperties(mirroringResponseProperties.input, required on create), renameConversationItemtoInputItem, make itsroleproperty read-only, and change thecontentfield onInputItem/ResponseItemtoRecord<unknown>to support polymorphic content. - #5178 Make
modelDeploymentRefwritable in the experimental Agent base typeAgentDefinitionAppliancemodel instead of read-only, so the client can select the underlying model deployment in both the Appliance and Platform deployment models.AgentPropertiesAppliance.definitionis no longer read-only either, since a read-only container would keep every nested field unsettable; the service-owned fields inside the definition remain read-only. - #4978 Fix the Agent base type contract version in the
@azureBaseTypedecorator on theAgentresource template, correcting a typo where it was set to2024-06-01instead of2026-04-01. - #5126 Fix
visibility-sealederrors reported for the resourcenameproperty when emitters or versioning re-apply the ARM resource decorators on a copy of the resource type
@azure-tools/typespec-client-generator-core
Section titled “@azure-tools/typespec-client-generator-core”- #4979 Surface
@encode(string)on boolean types inSdkBuiltInTypeso downstream emitters can generate string-encoded boolean (de)serialization. - #5027 Detect operation name conflicts when multiple services are combined into one client via
@client({service: [ServiceA, ServiceB]}). Previously only same-namespace duplicates were caught; now cross-service operation name collisions emit the existingduplicate-client-namediagnostic. - #5146 Add
wireTypetoSdkBuiltInTypeinterface and populate it from theencodedAsparameter of@encodefor integer, boolean, and bytes types. Previously,wireTypewas only set for datetime and duration types.
@azure-tools/azure-http-specs
Section titled “@azure-tools/azure-http-specs”- #4981 Fix
ResponseAsBool_HeadAsBooleanscenario coverage always failing. Split it into two scenarios (existsandnotExists) so the intentional404response ofnotExistsis validated withpassOnCode(404)instead ofpassOnSuccess(which requires all endpoints to return 2xx). Endpoint paths are unchanged. - #4991 Fix the
postPagingLroWithBodyARM scenario to declare the LRO final result (ArmLroLocationHeader<FinalResult = ProductListResult>) so the accepted response’slocationheader points at the paged result type.