[ApiController]

noun

say it: “AY-PEE-EYE kun-TROH-ler” /ˌeɪ piː ˈaɪ kənˈtroʊlər/

An attribute that switches on web API behavior for a controller, such as automatic 400 responses for bad input.

What is [ApiController]?

[ApiController] switches on API-friendly behaviour for a controller: automatic 400 responses for invalid input, and body binding for complex parameters.

In a sentence

  • “With ApiController, a missing required field returns 400 before my code even runs.”

Level: Apprentice · More ASP.NET Core terms at this level

Updated