-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routing
Milestone
Description
This issue tracks what should be included in the first PR that adds a MapAction
extension method to IEndpointRouteBuilder
.
Requirements:
- Support for binding
[FromBody]
,[FromRoute]
,[FromQuery]
,[FromHeaders]
,[FromService]
parameters.[FromBody]
will be JSON-only for the first iteration[FromQuery]
will likely not support complex types due to MVC-isms
- Serialize return value as JSON-only for first iteration
- Use
[Route]
attribute instead of an explicit parameter. - HttpContext injection
Follow up:
- Benchmarks (Add benchmarks for MapAction #29915)
- Remove LINQ from startup path
- Input and output formatters
- Model binding validation
- Swagger support (IApiDescriptionGroupCollectionProvider implementation)
- MapAction filters
Is your feature request related to a problem? Please describe.
I want to be able to use MVC features like parameter binding without having to write a Controller.
Describe the solution you'd like
A MapAction
extension method for IEndpointRouteBuilder
that accepts controller action-like delegates.
nil4 and loic-sharmanil4Kahbazi
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routing