title |
---|
December 2023 |
:::danger This release contains breaking changes :::
- 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]:
emitTypeReference
function takes an optional reference context that can be used to patch the context for the target. - [Emitter Framework]: Added
absolute-path
as 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
prettier
version 3.1.
- Add diagnostic when a namespace exists with routes, but no namespace is marked with
@service
.
- Add support for simple literal default on model properties.
- Add support for
StringTemplate
literals.
- Now emits all properties of unreferenced schemas.
- Treat union variants as Discriminator.
- Emitter will now emit all properties of unreferenced schemas.
- 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
Footer
andFooterItem
component to build your own. - Add
noopener noreferrer
to 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.
- Fix issue with
ResourceCreateModel
template collecting "update" properties instead of "create" properties.
- [Formatter]: Fix: Preserve parentheses in
valueof
expressions inside a union or array (e.g.(value of strring) | Model
). - Fix: Union variants are now assigned to the parent union.
- Fix: Enum with a value of
0
would have resulted intype
ofstring
andnumber
. - Fix: Scalar constraints combine with base scalar constraints.
- Fix
@maxValueExclusive
settingminimumExclusive
instead ofmaximumExclusive
- Fix: Report diagnostic instead of throwing errors in the case of duplicate ids or unknown scalar.
- FIX: Handle
bytes
as a multipart part type correctly and producetype: string, format: binary
- Configure the program viewer to respect the color theme",
- Fix crash in versioning library`.
- 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:\${
.
- Previously, unreferenced
Model
types (types not used in any operation) were emitted usingread
visibility, meaning that properties that had onlycreate
orupdate
visibility would not be included in the corresponding schema in the@typespec/openapi3
emitter. In this release, all properties of unreferenced Model types will appear in the output. - Previously,
bytes
types that appeared in amultipart/form-data
request or response would be marked as a base64 encoded string. In this release,multipart/form-data
bytes
types appearing in parts with anobject
type will be treated as a base64-encoded string, while those in non-model parts will appear as raw binary data.