-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Use minimal APIs for F# project templates #35833
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
Conversation
…- WebApi template
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
Co-authored-by: David Fowler <[email protected]>
…thods are returning something
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Show resolved
Hide resolved
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: timheuer@2f64bdd 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
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs
Show resolved
Hide resolved
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 |
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs
Show resolved
Hide resolved
Great, thanks. I will create a follow-up issue for this in F# repo. |
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor nits
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