Skip to content

July 2023

Release Notes July 2023 (2023-07-11)

See TypeSpec Core release notes

New Features

@azure-tools/typespec-autorest emitter

  • Deterministically order properties in generated OpenAPI documents. This will cause some ordering changes in this release, but should prevent ordering changes in the future.
  • Allow use of an enum type as a discriminator
  • Add warning for unsupported empty enum types
  • Show error details when failing to load an example file
  • Add support for nullable enum properties
  • Omit x-typespec-name extension by default from autorest output. A new configuration and command line option include-x-typespec-name: \"inline-only\" | \"never\" has been added to get previous behavior
  • Allow readonly schema for long-running operation status values, like provisioningState. Enable the new configuration option use-read-only-status-schema: true to get the new behavior.
  • Support non-specific scalar types like numeric, integer and float. Emit a warning when these types are used and emit the best approximation for the type.

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

  • Add operation templates to support new Asynchronous delete API guidelines ArmResourceDeleteWithoutOkAsync
  • Add operation templates to support new Asynchronous action operations with no return value ArmResourceActionNoResponseContentAsync

@azure-tools/typespec-azure-core bug fixes

  • Correct GetLroMetadata response for operations not tied to a resource (e.g. RPC operations)

@azure-tools/typespec-azure-resource-manager bug fixes

  • Fix generated route for CheckLocalNameAvailability operation template
  • Update LocationParameter to reference ARM common types

@azure-tools/typespec-client-generator-core bug fixes

  • fix for decorator about scalar extends string/numeric

New Linting Rules (@azure-tools/typespec-azure-core)

  • Use standard names for operations
  • Ensure NoContent (204) responses do not have a response body and OK (200) and Created (201) responses have a response body
  • Ensure RPC operations marked with @get or @delete don’t have request bodies
  • Require @useAuth decorator on Azure services
  • Discourage overriding the HTTP verb on standard operations
  • Discourage custom 4xx and 5xx responses

Deprecations

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

  • ArmResourceDeleteAsync is deprecated due to new ARM RPC guidelines. Asynchronous delete operations should use ArmResourceDeleteWithoutOkAsync
  • ArmResourceActionNoContentAsync is deprecated due to new ARM RPC guidelines. Asynchronous actions with no response value should use ArmResourceActionNoResponseContentAsync

Breaking Changes

There are breaking changes in typespec core libraries, see release notes for details.