Closed
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.
Metadata
Metadata
Assignees
Labels
This issue has been fixedIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesThis issue represents an ask for new feature or an enhancement to an existing oneController-like actions for endpoint routing