---
title: 0.41.0 March 2024
---

# Release Notes Version 0.41.0 - March 2024

See TypeSpec Core 0.55 [release notes](https://typespec.io/docs/release-notes/release-2024-04-02)

:::caution
This release contains breaking changes
:::

## Breaking Changes

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

API breaking changes:

- [#451](https://github.com/Azure/typespec-azure/pull/451) adjust generated discriminator property sequence to prevent potential breaking change
- [#459](https://github.com/Azure/typespec-azure/pull/459) enums are always fixed after we switch to use union to represent extensible enum
- [#444](https://github.com/Azure/typespec-azure/pull/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](https://github.com/Azure/typespec-azure/pull/524) deprecate getParameterMapping and make .bodyParam on SdkHttpOperation a single optional param instead of list
- [#536](https://github.com/Azure/typespec-azure/pull/536) git status
- [#515](https://github.com/Azure/typespec-azure/pull/515) change responses from a record to a mapping of status code, range, or default

## Deprecations

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

- [#407](https://github.com/Azure/typespec-azure/pull/407) Deprecate `ResourceIdentifier` in favor of new `Azure.Core.armResourceIdentifier`

  ```diff
  -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](https://github.com/Azure/typespec-azure/pull/560) add deprecation for `getResponseMapping()` on method, switch to `.resultPath` on `SdkServiceMethodResponse` instead
- [#504](https://github.com/Azure/typespec-azure/pull/504) deprecate `.arm` on `SdkClientType`. Instead, you should access `.arm` on your `SdkContext`
- [#381](https://github.com/Azure/typespec-azure/pull/381) deprecating isErrorOrChildOfError. Users should directly use isErrorModel from the standard TypeSpec library
- [#445](https://github.com/Azure/typespec-azure/pull/445) Users should call `.name` instead of `.nameInClient` on `SdkModelPropertyType`s
- [#447](https://github.com/Azure/typespec-azure/pull/447) move nullability onto params and responses. Add nullableValues on SdkArrayType and SdkDictionaryType
- [#503](https://github.com/Azure/typespec-azure/pull/503) Deprecate `.isError` on an `SdkModelType`. With `SdkPackage`, you should not need to know that a model is used as an error.
- [#511](https://github.com/Azure/typespec-azure/pull/511) Remove support for unused `.overloads` and `.overloading` on `SdkMethod`

## Features

### @azure-tools/typespec-autorest

- [#407](https://github.com/Azure/typespec-azure/pull/407) Add support for new `Azure.Core.armResourceIdentifier` scalar

### @azure-tools/typespec-azure-core

- [#407](https://github.com/Azure/typespec-azure/pull/407) Adding new `armResourceIdentifier` scalar to represent an Arm ID
- [#505](https://github.com/Azure/typespec-azure/pull/505) Enable `no-closed-literal` linter rule by default in `all` ruleset
- [#467](https://github.com/Azure/typespec-azure/pull/467) Enable `no-enum` rule by default in `all` ruleset

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

- [#386](https://github.com/Azure/typespec-azure/pull/386) put more validation and remove browse.argQuery from proxyResource usage

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

- [376](https://github.com/Azure/typespec-azure/pull/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](https://github.com/Azure/typespec-azure/pull/495) Made `delegatedIdentityClientId` optional `CustomerManagedKeyEncryption` to align with the common types definition.
- [#514](https://github.com/Azure/typespec-azure/pull/514) Add `lro-location-header` rule.
- [#369](https://github.com/Azure/typespec-azure/pull/369) Add `arm-put-operation-response-codes` and `arm-post-operation-response-codes` rules.
- [#359](https://github.com/Azure/typespec-azure/pull/359) ARM: add `arm-resource-name-pattern` rule to allow disabling LintDiff `ResourceNamePattern` rule

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

- [#384](https://github.com/Azure/typespec-azure/pull/384) return Versions enum as part of getAllModels
- [#538](https://github.com/Azure/typespec-azure/pull/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](https://github.com/Azure/typespec-azure/pull/395) add a cached getHttpOperation helper function
- [#402](https://github.com/Azure/typespec-azure/pull/402) add `discriminatorProperty` ref to discriminated model
- [#474](https://github.com/Azure/typespec-azure/pull/474) create SdkEndpointType to encapsulate templating and url
- [#413](https://github.com/Azure/typespec-azure/pull/413) Add `@access` and `@usage` support for named union
- [#502](https://github.com/Azure/typespec-azure/pull/502) add UsageFlags.MultipartFormData to represent whether a model is used as form data
- [#551](https://github.com/Azure/typespec-azure/pull/551) add `isGeneratedName` to `SdkModelPropertyTypes`
- [#455](https://github.com/Azure/typespec-azure/pull/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](https://github.com/Azure/typespec-azure/pull/572) Workaround for arm provider method parameter
- [#573](https://github.com/Azure/typespec-azure/pull/573) support scalar doc
- [#393](https://github.com/Azure/typespec-azure/pull/393) give a nonredundant name for templated instance model
- [#513](https://github.com/Azure/typespec-azure/pull/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](https://github.com/Azure/typespec-azure/pull/414) updating autorest to emit response headers in lexicographic order
- [#512](https://github.com/Azure/typespec-azure/pull/512) Fix: Discriminated inheritance wasn't resolving the `x-ms-discriminator-value` when it had an intermediate model.

### @azure-tools/typespec-azure-core

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

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

- [#410](https://github.com/Azure/typespec-azure/pull/410) Fixing ArmDeleteLroResponse missing Retry-After header

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

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