You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that 8.0 had #28596, so this issue should be linked to the equivalent for 9.0, if there ends up being one.
Additions
Support F# Async<'T> as an awaitable type in minimal APIs endpoints.
Changes
New runtime coercions: unit ⇝ void, when unit is the generic type argument of a generic awaitable type. These coercions apply both to minimal APIs endpoints as well as to controller action methods.
Task<unit> → Task
ValueTask<unit> → ValueTask
Async<unit> → Task
With default serialization settings, endpoints with the return types Task<unit> or ValueTask<unit>, whose response body was formerly the JSON token null, will now return an empty response body instead.
I'm opening this as a placeholder to ensure that the changes from dotnet/aspnetcore#46898 make it into the release notes for 9.0. See also: dotnet/aspnetcore#46773.
I see that 8.0 had #28596, so this issue should be linked to the equivalent for 9.0, if there ends up being one.
Additions
Async<'T>
as an awaitable type in minimal APIs endpoints.Changes
New runtime coercions:
unit
⇝void
, whenunit
is the generic type argument of a generic awaitable type. These coercions apply both to minimal APIs endpoints as well as to controller action methods.Task<unit>
→Task
ValueTask<unit>
→ValueTask
Async<unit>
→Task
With default serialization settings, endpoints with the return types
Task<unit>
orValueTask<unit>
, whose response body was formerly the JSON tokennull
, will now return an empty response body instead.EDIT by @Rick-Anderson to add the following metadata
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/minimal-apis.md
Document ID
b09824ab-b051-75a1-13b7-b0e281cc46e0
Article author
Rick-Anderson
Associated WorkItem - 186857
The text was updated successfully, but these errors were encountered: