Skip to content

Implement a minimal version of MapAction  #29684

Closed
@halter73

Description

@halter73

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

DoneThis issue has been fixedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-minimal-actionsController-like actions for endpoint routing

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions