November 2023
Release Notes November 2023 (2023-11-07)
Section titled “Release Notes November 2023 (2023-11-07)”See TypeSpec Core release notes
New Features
Section titled “New Features”@azure-tools/typespec-autorest New Features
Section titled “@azure-tools/typespec-autorest New Features”- Add support for ARM common definitions versioning.
- Add better support for
@sharedRoutesby automatically disambiguating x-ms-paths when operation signatures don’t differ by query params.
@azure-tools/typespec-azure-core New Features
Section titled “@azure-tools/typespec-azure-core New Features”- Add new linter rules discouraging misuse of inheritance and composition. Warn when extending a model without a discriminator or alternatively when composing a model with a discriminator.
@azure-tools/typespec-azure-resource-manager New Features
Section titled “@azure-tools/typespec-azure-resource-manager New Features”- ARM
common-typesversions can now be selected for each service specification version using theAzure.ResourceManager.CommonTypes.Versionsenum with the new@armCommonTypesVersiondecorator. - Add support for Private Links
v5common types. - Add support for Customer Managed Keys
v5common-types.
@azure-tools/typespec-client-generator-core New Features
Section titled “@azure-tools/typespec-client-generator-core New Features”- Add parent enum as type on
SdkEnumValueType. - Add
emitterNameandemitterContexttoSdkContext.
@azure-tools/typespec-providerhub-controller New Features
Section titled “@azure-tools/typespec-providerhub-controller New Features”- Add extensibility point to generated enum struct - marked generated struct as
readonly partial. - Added common base class for
ResourceControllerBaseclasses.
Bug Fixes
Section titled “Bug Fixes”@azure-tools/typespec-autorest Bug Fixes
Section titled “@azure-tools/typespec-autorest Bug Fixes”- Fix: Stops emitting an error when using
@body _: voidin operation parameters and treat it as no body.
@azure-tools/typespec-azure-core Bug Fixes
Section titled “@azure-tools/typespec-azure-core Bug Fixes”- Fix:
getLroMetadatadid not return the correctlogicalResultwhen the@finalLocationwas aResourceLocation. - Fix: Correct property validation for
@lroResultand@lroErrorResult.
@azure-tools/typespec-client-generator-core Bug Fixes
Section titled “@azure-tools/typespec-client-generator-core Bug Fixes”- Fix:
@accessdoes not propagate. - Fix: usage override for orphan enum.
@azure-tools/typespec-msbuild-target Bug Fixes
Section titled “@azure-tools/typespec-msbuild-target Bug Fixes”- Fix: Removed condition
Language==C#.
@azure-tools/typespec-providerhub-controller Bug Fixes
Section titled “@azure-tools/typespec-providerhub-controller Bug Fixes”- Fix: Ensure models referenced only in derived types are generated.
Deprecations
Section titled “Deprecations”@azure-tools/typespec-client-generator-core Deprecations
Section titled “@azure-tools/typespec-client-generator-core Deprecations”- Deprecate
@include,@exclude,@internal,@clientFormat.
Breaking Changes
Section titled “Breaking Changes”- There are breaking changes in the TypeSpec core libraries, see the release notes for details.
Typescript types breaking change
Section titled “Typescript types breaking change”The package.json files for all packages have been changed to use the standard types field instead of the legacy typesVersions field to specify types for subpath exports. This means that packages consuming TypeSpec must use the moduleResolution setting with node16 or nodenext in their tsconfig.json.
You might see the following error:
Cannot find module '@typespec/compiler/testing'. Did you mean to set the 'moduleResolution' option to 'nodenext'This can be resolved by changing the following in tsconfig.json:
"moduleResolution": "ESNext","moduleResolution": "node16",Dropped Support for Node version 16
Section titled “Dropped Support for Node version 16”- All typespec packages now specify node 18 as the minimum version. Consuming packages should no longer use node 16 and update the node specification in the
enginessection of their package.json file appropriately.
@azure-tools/typespec-azure-core Breaking Changes
Section titled “@azure-tools/typespec-azure-core Breaking Changes”- Removed
InprogressfromOperationStateenum. AddedRunning,NotStartedstates. All APIs that use this enumeration for operation status values will now include these states.