August 2023
New Features
Section titled âNew Featuresâ@typespec/compiler New Features
Section titled â@typespec/compiler New Featuresâ- Allow unnamed variants in named unions
- Add #deprecateddirective to replace@deprecateddecorator, allowing deprecation any language element
- Add a new util resolveCompilerOptionsto resolve compiler options from a given entrypoint. This will resolve the options from the tspconfig.yaml in the same way the cli would.
- Improvements to compiler watch mode. Files loaded in previous compilation will be watched for changes.
- Allow library dependency versions to be specified in init templates using the form { name: \"the-lib\", version: \"1.0.0\" }
- Update init template version compare to be greaterThanAndEqual instead of greaterThan.
@typespec/http New Features
Section titled â@typespec/http New Featuresâ- Update model, operation and template docs for OpenAPI developers
- Add collection format support for query and header properties: simple, form, ssv, tsv, pipes
@typespec/openapi and @typespec/openapi3 New Features
Section titled â@typespec/openapi and @typespec/openapi3 New Featuresâ- Add new @infodecorator providing the ability to specify the additional fields from openapi info object.
- Support collection format support for query and header properties: simple, form, ssv, tsv, pipes
- Change datetimes encoded with rfc7231to produce formathttp-dateinstead ofdate-time-rfc7231to be inline with Openapi format registry
Bug Fixes
Section titled âBug Fixesâ@typespec/compiler Bug Fixes
Section titled â@typespec/compiler Bug Fixesâ- Fix: Compiler version mismatch error would fire incorrectly
- Fix some issues with not reporting deprecation on template constraints
- Fix issue where using augment decorators on spread model properties, enum members or operations extended from parent interface would have no effect.
- Fix issue where using augment decorator on operation parameters applied to source operation parameter as well.
- Fix warn-as-errorconfiguration intspconfig.yamlwas ignored
- Emit diagnostic for an unresolved metatype property reference
- Fix crash when usingargument is not a namespace
@typespec/openapi3 Bug Fixes
Section titled â@typespec/openapi3 Bug Fixesâ- Fix: Emit clear diagnostics for empty unions and enum types
- Fix: Apply @minItemsand@maxItemsdecorators on model array
@typespec/jsonschema
Section titled â@typespec/jsonschemaâ- Fix: Crash when using interfaces inside a @jsonSchemanamespace
Breaking Changes
Section titled âBreaking Changesâ@typespec/compiler Breaking Changes
Section titled â@typespec/compiler Breaking Changesâ- Emitter Framework: sourceFilemethod can return aPromise. This allows running async processes when generating the file content, such as a formatter. This results in a potential breaking change if callingemitSourceFilewhere youâll have to addawaitbefore.
- The helper function formatTypeSpecis now async. Formatter was updated to use prettier 3.0.