September 2023
Release Notes September 2023 (2023-09-12)
Section titled “Release Notes September 2023 (2023-09-12)”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”- Handle general encodings for
utcDateTime. - Support Http operations that set custom visibility.
@azure-tools/typespec-azure-core New Features
Section titled “@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.yamlto execute all typespec-azure-core linter rules:linter:extends: ["@azure-tools/typespec-azure-core/all"] -
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.
@lroResultdecorates the property containing the final operation result when an operation completes successfully. This is only necessary if the property has a name other thanresult.@lroErrorResultdecorates the property containing errors when an operation fails. This is only necessary if the property has a name other thanerror.@pollingOperationParameterdecorates 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:linkcontains the mechanism for retrieving the status monitorresultcontains type information returned from the linked operation.parameterMapcontains a map from parameters and response properties of the original operation to parameters of the linked operation.
-
Add new validation to
@pollingOperationto 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
LroMetadatareturned fromgetLroMetadataenvelopeResultcontains the status monitor typelogicalPathcontains a path to the field containing lro results (if any).
-
@pollingOperationand@finalOperationdetermine 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
Section titled “@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.yamlto execute all typespec-azure-resource-manager linter rules:linter:extends: ["@azure-tools/typespec-azure-resource-manager/all"] -
Add common types and sample for
privateLinksandprivateEndpoints
@azure-tools/typespec-client-generator-core New Features
Section titled “@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
@friendlyNameand@projectedNamein functiongetLibraryName(). - Deduplicate models in the map.
- Fix enum discriminator type for base class.
- Add
getAllModelsfunction. - Make
__rawoptional. - Add tuple type support.
- Add
@usageand@accessdecorators.
Bug Fixes
Section titled “Bug Fixes”@azure-tools/typespec-autorest Bug Fixes
Section titled “@azure-tools/typespec-autorest Bug Fixes”- Fix handling of
model extends Record<T>andmodel is Record<T>. - Resolve the correct
nextLinkNameif 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
Section titled “@azure-tools/typespec-azure-core Bug Fixes”- Apply conditional request headers to all appropriate operations.
- Fixes to allow traits to work with
RpcOperationandLongRunningRpcOperation
@azure-tools/typespec-azure-resource-manager Bug Fixes
Section titled “@azure-tools/typespec-azure-resource-manager Bug Fixes”- Change
ArmResourceActionNoContentAsyncto indicate it should not be used for new operations.ArmResourceActionNoResponseContentAsyncshould be used instead.
@azure-tools/typespec-client-generator-core Bug Fixes
Section titled “@azure-tools/typespec-client-generator-core Bug Fixes”- Fix enum discriminator type for base class.
Deprecations
Section titled “Deprecations”@azure-tools/typespec-azure-core Deprecations
Section titled “@azure-tools/typespec-azure-core Deprecations”- Paging metadata provides a new segments array to resolve
itemsandnextLinkpath. The olditemsPathandnextLinkPathare deprecated as they cannot be used when a property name contains a..
Breaking Changes
Section titled “Breaking Changes”- There are breaking changes in the TypeSpec core compiler, see the release notes for details.
@azure-tools/typespec-azure-core Breaking Changes
Section titled “@azure-tools/typespec-azure-core Breaking Changes”@pollingOperationnow overrides the value provided in@pollingLocationin operation responses.@finalOperationnow overrides the value provided in@finalLocationin operation responses.CreateOrUpdateandLongRunningCreateOrUpdatenow include create-only properties in the request body.getLongRunningStatesandextractLroStatesnow return an array of strings forsucceededState,failedStateandcanceledStateproperties.