December 2023
New Features
@typespec/compiler New Features
- New Language Feature Added string template literal in typespec. Single and multi-line strings can be interpolated with 
${and}. Example\\Doc for url ${url} is here: ${location}\\ - [Emitter Framework]: 
emitTypeReferencefunction takes an optional reference context that can be used to patch the context for the target. - [Emitter Framework]: Added 
absolute-pathas a known format for emitter options which will validate the value passed by the user resolve to an absolute path. - [Emitter Framework]: Allow scalar and enum declarations to provide a reference context.
 - [Emitter Framework]: Allow passing a custom context when calling 
emitType. - Linter rules can now supply a full url to documentation.
 - Upgrade formatter to 
prettierversion 3.1. 
@typespec/http New Features
- Add diagnostic when a namespace exists with routes, but no namespace is marked with 
@service. 
@typespec/json-schema New Features
- Add support for simple literal default on model properties.
 - Add support for 
StringTemplateliterals. 
@typespec/openapi3 New Features
- Now emits all properties of unreferenced schemas.
 - Treat union variants as Discriminator.
 - Emitter will now emit all properties of unreferenced schemas.
 
@typespec/playground New features
- Add a format button to the playground command bar.
 - Add a notification to the standalone playground when the playground has been saved.
 - Enable changing the theme.
 - Add resizable panes for the editor and output
 - Add ability to pass a custom footer and use 
FooterandFooterItemcomponent to build your own. - Add 
noopener noreferrerto footer external link - Move errors and warnings to a dedicated expandable banner at the bottom of the playground.
 - BREAKING CHANGE Styles must be imported seperately with 
import \"@typespec/playground/styles.css\"; - Allow standalone playground to show a loading fallback.
 - Upgrade swagger-ui component.
 
@typespec/rest New Features
- Fix issue with 
ResourceCreateModeltemplate collecting “update” properties instead of “create” properties. 
Bug Fixes
@typespec/compiler Bug Fixes
- [Formatter]: Fix: Preserve parentheses in 
valueofexpressions inside a union or array (e.g.(value of strring) | Model). - Fix: Union variants are now assigned to the parent union.
 
@typespec/json-schema Bug Fixes
- Fix: Enum with a value of 
0would have resulted intypeofstringandnumber. - Fix: Scalar constraints combine with base scalar constraints.
 - Fix 
@maxValueExclusivesettingminimumExclusiveinstead ofmaximumExclusive 
@typespec/openapi3 Bug Fixes
- Fix: Report diagnostic instead of throwing errors in the case of duplicate ids or unknown scalar.
 - FIX: Handle 
bytesas a multipart part type correctly and producetype: string, format: binary 
@typespec/playground Bug Fixes
- Configure the program viewer to respect the color theme”,
 
@typespec/versioning Bug Fixes
- Fix crash in versioning library`.
 
Breaking Changes
- New Language Feature string interpolation to strings in TypeSpec. Strings that use the sequence 
${are now expected to start a reference to an interpolated value. Strings that contain${and are not meant for interpolation must now be escaped with a\, like this:\${. 
Semantic Changes in OpenApi3 Output
- Previously, unreferenced 
Modeltypes (types not used in any operation) were emitted usingreadvisibility, meaning that properties that had onlycreateorupdatevisibility would not be included in the corresponding schema in the@typespec/openapi3emitter. In this release, all properties of unreferenced Model types will appear in the output. - Previously, 
bytestypes that appeared in amultipart/form-datarequest or response would be marked as a base64 encoded string. In this release,multipart/form-databytestypes appearing in parts with anobjecttype will be treated as a base64-encoded string, while those in non-model parts will appear as raw binary data.