When was Minimal API introduced?

Minimal APIs were introduced in:

Before minimal API, for making independent & smaller services or microservices. A new web Api project needs to be created.

Because making simple microservice using Web API project has lot of boiler plate code before Minimal Api compared to other frameworks.

  1. Controller class

  2. Attributes

  3. Route configuration

  4. Startup class.

The boiler plate & code footprints were unnecessary for micro services & their docker files using.NET Web Api.

Node JS & Fast API framework already provided minimal Api like feature.

Node.js Express

Code
app.get("/hello", (req,res)=>res.send("Hello")).

Python FastAPI

Code
@app.get("/hello")
def hello():
    return "Hello"

Go HTTP

Code
http.HandleFunc("/hello", hello)

So, for quickly creating microservices & improving their speed.

Hence minimal Apis was introduced in.NET to reduce boiler plate, improve speed & developer productivity.

.NET Minimal API

Code
app.MapGet("/hello", () => "Hello");

They were part of Microsoft's push toward:

What Minimal API Reduced

Before

Typical microservice project structure:

Code
Controllers/
Models/
DTOs/
Services/
Repositories/
Startup.cs
Program.cs
appsettings.json

Even a tiny service required many files.

After Minimal API:

Possible structure:

Code
Program.cs
OrderService.cs
appsettings.json

Or even

Code
Program.cs only

So, Minimal API reduced internal complexity, not deployment architecture.