0.56 - May 2024
Breaking Changes
@typespec/http
-
#2945 Empty model after removing metadata and applying visibility always results in “void” This means the following case have changed from returning
{}
to no bodyWorkaround: Use explicit
@body
-
#2945 Implicit status code always 200 except if response is explicitly
void
Solution: Add explicit
@statusCode
-
#2945
@body
means this is the bodyThis change makes using
@body
mean this is the exact body and everything underneath will be included, including metadata properties. If metadata properties are present on the body, a warning will be logged.Use
@bodyRoot
if you want to only change where to resolve the body from. -
#2945 Properties are not automatically omitted if everything was removed from metadata or visibility
Solution: use
@bodyIgnore
Features
@typespec/compiler
- #3035
getEncode
returns the fully qualified enum member name if using a custom enum. - #3183 Show template parameters when hovering on an operation template
- #3191 [API] Add new
sourceModels
property to model
@typespec/rest
- #2945 Add support for new
@bodyRoot
and@body
distinction
@typespec/openapi3
- #2945 Add support for new
@bodyRoot
and@body
distinction
@typespec/html-program-viewer
- #3191 Add
sourceModels
property to model view
Bug Fixes
@typespec/compiler
- #3170
--nostdlib
flag will now work by only applying to optional standard library types - #3212 Fix: augmenting template model property could result in sending invalid argument to decorator
- #3188 Fix: Do not crash when trying to access member of aliased expressions
- #3185 Fix tsp init hanging when done due to unclosed connection
- #3151 IDE: Fix completion of statement keywords
- #3287 Templated interface extending another templated interface shouldn’t run decorator on their operations
- #3290 Model with an optional property should not satisfy a constraint with that property required. (
{foo?: string}
cannot be assigned to a constraint of{foo: string}
) - #3163 Fix: Model with spread indexer shouldn’t validate explicit properties
- #3227 Stop running decorators on partially instantiated operations(When interface is instantiated but not the operation)
- #3180 Fix issue where directives were not parsed to the leaf node in multi-segment Namespace segments.
- #3243 Fix calling
tsp install
on windows due to recent NodeJS breaking change to fix vulnerability. - #3216 Fix compiler crash when using an invalid
is
target in an interface operation template - #3246 Internals: Use node built-in
fetch
API that is now stable since node18.13.0
@typespec/http
- #3196 Fix password flow defining
authorizationUrl
instead oftokenUrl
- #3190 Fix
@path
param mapping when spreading a record in operation parameters - #3218 Fix:
@path
property shouldn’t be applicableMetadata if the visibility containsRead
@typespec/versioning
- #3264 Fix crash when
@service
appears inside a versioned namespace
@typespec/openapi3
- #3218 Fix:
@path
property should be included in unreachable models