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

Release Notes September 2023 (2023-09-12)

danger

This release contains breaking changes

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:

    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.

    • @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 than result.
    • @lroErrorResult decorates the property containing errors when an operation fails. This is only necessary if the property has a name other than error.
    • @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 monitor
    • result 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 from getLroMetadata

    • envelopeResult contains the status monitor type
    • logicalPath 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:

    linter:
    extends: ["@azure-tools/typespec-azure-resource-manager/all"]
  • Add common types and sample for privateLinks and privateEndpoints

@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 function getLibraryName().
  • 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> and model 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 and LongRunningRpcOperation

@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 and nextLink path. The old itemsPath and nextLinkPath 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 and LongRunningCreateOrUpdate now include create-only properties in the request body.
  • getLongRunningStates and extractLroStates now return an array of strings for succeededState, failedState and canceledState properties.