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 optioninclude-x-typespec-name: \"inline-only\" | \"never\"
has been added to get previous behavior - Allow
readonly
schema for long-running operation status values, likeprovisioningState
. Enable the new configuration optionuse-read-only-status-schema: true
to get the new behavior. - Support non-specific scalar types like
numeric
,integer
andfloat
. 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 andOK
(200) andCreated
(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 useArmResourceDeleteWithoutOkAsync
ArmResourceActionNoContentAsync
is deprecated due to new ARM RPC guidelines. Asynchronous actions with no response value should useArmResourceActionNoResponseContentAsync
Breaking Changes
There are breaking changes in typespec core libraries, see release notes for details.