August 2023
New Features
@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
- 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
- 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
@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
- Fix: Emit clear diagnostics for empty unions and enum types
 - Fix: Apply 
@minItemsand@maxItemsdecorators on model array 
@typespec/jsonschema
- Fix: Crash when using interfaces inside a 
@jsonSchemanamespace 
Breaking Changes
@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.