September 2023
Release Notes September 2023 (2023-09-12)
See TypeSpec Core release notes
New Features
@azure-tools/typespec-autorest
New Features
- Handle general encodings for
utcDateTime
. - Support Http operations that set custom visibility.
@azure-tools/typespec-azure-core
New Features
-
Migrate linter rules into a new ruleset. Linter rules will NOT be automatically enabled. Add the following to your
tspconfig.yaml
to execute all typespec-azure-core linter rules: -
Trait properties can now specify a
@traitContext
, which overrides the value supplied in the trait envelope model. This enables finer granularity for applying specific properties through traits. -
Add new decorators for customizing status monitor types in long-running operations.
@lroResult
decorates the property containing the final operation result when an operation completes successfully. This is only necessary if the property has a name other thanresult
.@lroErrorResult
decorates the property containing errors when an operation fails. This is only necessary if the property has a name other thanerror
.@pollingOperationParameter
decorates request parameters or response properties that correspond to request parameters in the linked operation. This allows emitters and libraries to call the polling operation using the result of the original operation.
-
Add new properties to OperationLinkMetadata returned from
getOperationLink
:link
contains the mechanism for retrieving the status monitorresult
contains type information returned from the linked operation.parameterMap
contains a map from parameters and response properties of the original operation to parameters of the linked operation.
-
Add new validation to
@pollingOperation
to ensure the referenced operation is a valid status monitor, and the decorated (original) operation has a valid link to the operation, or contains response headers that link to the status monitor. -
Allow multiple terminal status values for successful, failed, and canceled long-running operations.
-
Add new properties to
LroMetadata
returned fromgetLroMetadata
envelopeResult
contains the status monitor typelogicalPath
contains a path to the field containing lro results (if any).
-
@pollingOperation
and@finalOperation
determine the status monitor type and final result type for long-running operations -
Add conceptual documentation and samples for long-running operations.
@azure-tools/typespec-azure-resource-manager
New Features
-
Migrate linter rules into a new ruleset. Linter rules will NOT be automatically enabled. Add the following to your
tspconfig.yaml
to execute all typespec-azure-resource-manager linter rules: -
Add common types and sample for
privateLinks
andprivateEndpoints
@azure-tools/typespec-client-generator-core
New Features
- Add new calls to determine if a service is an ARM service.
- Add documentation for SDK types.
- handle both
@friendlyName
and@projectedName
in functiongetLibraryName()
. - Deduplicate models in the map.
- Fix enum discriminator type for base class.
- Add
getAllModels
function. - Make
__raw
optional. - Add tuple type support.
- Add
@usage
and@access
decorators.
Bug Fixes
@azure-tools/typespec-autorest
Bug Fixes
- Fix handling of
model extends Record<T>
andmodel is Record<T>
. - Resolve the correct
nextLinkName
if property name has.
. - Fix handling of header with encode
rfc7231
- Fix sorting the properties in known OpenAPI extensions.
@azure-tools/typespec-azure-core
Bug Fixes
- Apply conditional request headers to all appropriate operations.
- Fixes to allow traits to work with
RpcOperation
andLongRunningRpcOperation
@azure-tools/typespec-azure-resource-manager
Bug Fixes
- Change
ArmResourceActionNoContentAsync
to indicate it should not be used for new operations.ArmResourceActionNoResponseContentAsync
should be used instead.
@azure-tools/typespec-client-generator-core
Bug Fixes
- Fix enum discriminator type for base class.
Deprecations
@azure-tools/typespec-azure-core
Deprecations
- Paging metadata provides a new segments array to resolve
items
andnextLink
path. The olditemsPath
andnextLinkPath
are deprecated as they cannot be used when a property name contains a.
.
Breaking Changes
- There are breaking changes in the TypeSpec core compiler, see the release notes for details.
@azure-tools/typespec-azure-core
Breaking Changes
@pollingOperation
now overrides the value provided in@pollingLocation
in operation responses.@finalOperation
now overrides the value provided in@finalLocation
in operation responses.CreateOrUpdate
andLongRunningCreateOrUpdate
now include create-only properties in the request body.getLongRunningStates
andextractLroStates
now return an array of strings forsucceededState
,failedState
andcanceledState
properties.