Use minimal APIs for F# project templates#35833
Conversation
…- WebApi template
Co-authored-by: David Fowler <davidfowl@gmail.com>
…thods are returning something
|
This is missing the call to AddControllers |
|
If we really want to match, we could add the Swagger/OpenAPI aspects as well |
|
It occurs to me we deleted startup but we should have copied the code from startup to here. |
Scratch this...more changes than needed right now -- we should consider adding this later (net7) |
That was my intention, I probably missed some stuff. Sorry for that, I'm not very familiar with apsnetcore APIs, I've mostly tested that project builds, probably have to do some more extensive testing. |
Here's my version of a diff: https://github.com/timheuer/aspnetcore/commit/2f64bdd0abbc245986d8f661774cac83a1a1f348 StarterWeb for F# could change as well -- a few more changes there that would be needed with RazorCompilation |
Yeah, that's what I intended to have pretty much (without ignores, but nowarn instead, we discussed it internally), and missing the AddControllers().
Yeah, gotta do them in this PR as well. |
…/aspnetcore into fsharp-minimal-apis
|
One curve ball, we're adding a -minimal flag to the API template #36068. We might want to do the same here. |
Shall it be done as part of this PR, or can I make changes in a separate one? |
Definite curve ball -- going to add you to a convo @davidfowl this afternoon if you can make it (unrelated to F#) |
|
It can be separate |
Great, thanks. I will create a follow-up issue for this in F# repo. |
|
We'll backport this to rc2, right? |
Thanks, Don. Resolved. Many are result of copy-pasting C# template :) |
|
/backport to release/6.0-rc2 |
|
Started backporting to release/6.0-rc2: https://github.com/dotnet/aspnetcore/actions/runs/1246354573 |
Use minimal hosting APIs for F# project templates
Change existing project templates to use minimal hosting APIs for F# projects.
PR Description
Changing WebApi-FSharp and StarterWeb-FSharp to use minimal APIs
Fixes #34123