Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support F# Async<'T> as an awaitable type in minimal APIs #31140

Open
brianrourkeboll opened this issue Nov 27, 2023 · 1 comment
Open

Support F# Async<'T> as an awaitable type in minimal APIs #31140

brianrourkeboll opened this issue Nov 27, 2023 · 1 comment
Labels
9.0 .NET 9 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@brianrourkeboll
Copy link

brianrourkeboll commented Nov 27, 2023

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

  • Support F# Async<'T> as an awaitable type in minimal APIs endpoints.

Changes

  • New runtime coercions: unitvoid, 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.

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

@Rick-Anderson Rick-Anderson added 9.0 .NET 9 reQUEST Triggers an issue to be imported into Quest and removed ⌚ Not Triaged labels Nov 28, 2023
@github-actions github-actions bot added seQUESTered Identifies that an issue has been imported into Quest. and removed reQUEST Triggers an issue to be imported into Quest labels Nov 29, 2023
@Rick-Anderson
Copy link
Contributor

See #31149 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.0 .NET 9 seQUESTered Identifies that an issue has been imported into Quest.
Projects
None yet
Development

No branches or pull requests

3 participants