July 2023
Release Notes July 2023 (2023-07-11)
Section titled “Release Notes July 2023 (2023-07-11)”See TypeSpec Core release notes
New Features
Section titled “New Features”@azure-tools/typespec-autorest emitter
Section titled “@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
enumtype as a discriminator - Add warning for unsupported empty
enumtypes - Show error details when failing to load an example file
- Add support for nullable
enumproperties - Omit
x-typespec-nameextension 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
readonlyschema for long-running operation status values, likeprovisioningState. Enable the new configuration optionuse-read-only-status-schema: trueto get the new behavior. - Support non-specific scalar types like
numeric,integerandfloat. Emit a warning when these types are used and emit the best approximation for the type.
@azure-tools/typespec-azure-resource-manager library
Section titled “@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
Section titled “@azure-tools/typespec-azure-core bug fixes”- Correct
GetLroMetadataresponse for operations not tied to a resource (e.g. RPC operations)
@azure-tools/typespec-azure-resource-manager bug fixes
Section titled “@azure-tools/typespec-azure-resource-manager bug fixes”- Fix generated route for
CheckLocalNameAvailabilityoperation template - Update
LocationParameterto reference ARM common types
@azure-tools/typespec-client-generator-core bug fixes
Section titled “@azure-tools/typespec-client-generator-core bug fixes”- fix for decorator about
scalar extends string/numeric
New Linting Rules (@azure-tools/typespec-azure-core)
Section titled “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
@getor@deletedon’t have request bodies - Require
@useAuthdecorator on Azure services - Discourage overriding the HTTP verb on standard operations
- Discourage custom 4xx and 5xx responses
Deprecations
Section titled “Deprecations”@azure-tools/typespec-azure-resource-manager deprecations
Section titled “@azure-tools/typespec-azure-resource-manager deprecations”ArmResourceDeleteAsyncis deprecated due to new ARM RPC guidelines. Asynchronous delete operations should useArmResourceDeleteWithoutOkAsyncArmResourceActionNoContentAsyncis deprecated due to new ARM RPC guidelines. Asynchronous actions with no response value should useArmResourceActionNoResponseContentAsync
Breaking Changes
Section titled “Breaking Changes”There are breaking changes in typespec core libraries, see release notes for details.