Skip to main content
Version: Latest (Core: 0.57.x, Azure: 0.43.x)

Release Notes Version 0.41.0 - March 2024

See TypeSpec Core 0.55 release notes

warning

This release contains breaking changes

Breaking Changes​

@azure-tools/typespec-client-generator-core​

API breaking changes:

  • #451 adjust generated discriminator property sequence to prevent potential breaking change
  • #459 enums are always fixed after we switch to use union to represent extensible enum
  • #444 SdkUnionType, SdkEnumType, and SdkModelType will now always have a .name property. .isGeneratedName is now a boolean that expresses whether the .name was generated or described in the tsp
  • #524 deprecate getParameterMapping and make .bodyParam on SdkHttpOperation a single optional param instead of list
  • #536 git status
  • #515 change responses from a record to a mapping of status code, range, or default

Deprecations​

@azure-tools/typespec-azure-resource-manager​

  • #407 Deprecate ResourceIdentifier in favor of new Azure.Core.armResourceIdentifier

    -myId: ResourceIdentifier;
    +myId: Azure.Core.armResourceIdentifier;

    If you where not using any types from Azure.Core previously you might need to add @useDependency(Azure.Core.Versions.v1_0_Preview_2 on your version enum members.

@azure-tools/typespec-client-generator-core​

  • #560 add deprecation for getResponseMapping() on method, switch to .resultPath on SdkServiceMethodResponse instead
  • #504 deprecate .arm on SdkClientType. Instead, you should access .arm on your SdkContext
  • #381 deprecating isErrorOrChildOfError. Users should directly use isErrorModel from the standard TypeSpec library
  • #445 Users should call .name instead of .nameInClient on SdkModelPropertyTypes
  • #447 move nullability onto params and responses. Add nullableValues on SdkArrayType and SdkDictionaryType
  • #503 Deprecate .isError on an SdkModelType. With SdkPackage, you should not need to know that a model is used as an error.
  • #511 Remove support for unused .overloads and .overloading on SdkMethod

Features​

@azure-tools/typespec-autorest​

  • #407 Add support for new Azure.Core.armResourceIdentifier scalar

@azure-tools/typespec-azure-core​

  • #407 Adding new armResourceIdentifier scalar to represent an Arm ID
  • #505 Enable no-closed-literal linter rule by default in all ruleset
  • #467 Enable no-enum rule by default in all ruleset

@azure-tools/typespec-azure-portal-core​

  • #386 put more validation and remove browse.argQuery from proxyResource usage

@azure-tools/typespec-azure-resource-manager​

  • 376 RetryAfter header was moved to be in the default LroHeaders for LRO operations. If you were overriding the LroHeaders template parmater previously you might need to add & Azure.Core.FoundationsRetryAfterHeader
  • #495 Made delegatedIdentityClientId optional CustomerManagedKeyEncryption to align with the common types definition.
  • #514 Add lro-location-header rule.
  • #369 Add arm-put-operation-response-codes and arm-post-operation-response-codes rules.
  • #359 ARM: add arm-resource-name-pattern rule to allow disabling LintDiff ResourceNamePattern rule

@azure-tools/typespec-client-generator-core​

  • #384 return Versions enum as part of getAllModels
  • #538 When no server url is passed, we still set serverUrl to {endpoint} and make one templateArg for endpoint. This way, emitters can always look at a combination of serverUrl and templateArguments to get the full picture
  • #395 add a cached getHttpOperation helper function
  • #402 add discriminatorProperty ref to discriminated model
  • #474 create SdkEndpointType to encapsulate templating and url
  • #413 Add @access and @usage support for named union
  • #502 add UsageFlags.MultipartFormData to represent whether a model is used as form data
  • #551 add isGeneratedName to SdkModelPropertyTypes
  • #455 We've added Usage.JsonMergePatch. Usage.Input continues to refer to all inputs, Usage.JsonMergePatch is set if a model is explicitly set as JSON merge patch input body
  • #572 Workaround for arm provider method parameter
  • #573 support scalar doc
  • #393 give a nonredundant name for templated instance model
  • #513 all clients now have an initialization property. whether the initialization property is public or not determines whether an end-user should instantiate that client

Bug Fixes​

@azure-tools/typespec-autorest​

  • #414 updating autorest to emit response headers in lexicographic order
  • #512 Fix: Discriminated inheritance wasn't resolving the x-ms-discriminator-value when it had an intermediate model.

@azure-tools/typespec-azure-core​

  • #392 Fix @lroStatus not detecting default states correctly when using union
  • #498 no-enum rule codefix now convert to named variant when the enum had not values (e.g. enum E {a, b})
  • #549 Remove readOnly from nextLink in templates (#418)
  • #462 Update property-name-conflict linter rule to stop looking and recommending @projectedName in favor of @clientName

@azure-tools/typespec-azure-resource-manager​

  • #410 Fixing ArmDeleteLroResponse missing Retry-After header

@azure-tools/typespec-client-generator-core​

  • #556 ensure apiVersion parameter is always generated with name apiVersion
  • #563 filter out TypeSpec.ARM models as well from sdkPackage.models
  • #434 Fix wrong client cache for package clients calculation
  • #561 fix template naming for enums
  • #508 fix wrong usage calculation for enum value model property
  • #517 fix wrong union generatedName flag and refine templated model naming
  • #389 rollback change of union as enum with hierarchy
  • #412 prevent carry over for @clientName
  • #569 don't recursively set MultipartFormData usage for models that are properties on a MultipartFormData model
  • #572 Set spread model with none usage
  • #501 rename UsageFlags.Versioning to UsageFlags.ApiVersionEnum