Pandatech.FluentMinimalApiMapper
4.0.0
dotnet add package Pandatech.FluentMinimalApiMapper --version 4.0.0
NuGet\Install-Package Pandatech.FluentMinimalApiMapper -Version 4.0.0
<PackageReference Include="Pandatech.FluentMinimalApiMapper" Version="4.0.0" />
<PackageVersion Include="Pandatech.FluentMinimalApiMapper" Version="4.0.0" />
<PackageReference Include="Pandatech.FluentMinimalApiMapper" />
paket add Pandatech.FluentMinimalApiMapper --version 4.0.0
#r "nuget: Pandatech.FluentMinimalApiMapper, 4.0.0"
#:package Pandatech.FluentMinimalApiMapper@4.0.0
#addin nuget:?package=Pandatech.FluentMinimalApiMapper&version=4.0.0
#tool nuget:?package=Pandatech.FluentMinimalApiMapper&version=4.0.0
Pandatech.FluentMinimalApiMapper
A lightweight helper for auto-discovering and registering Minimal API endpoints across assemblies. Define IEndpoint,
call two methods in Program.cs, and every endpoint in your project is wired up automatically.
Inspired by Carter's routing concept but stripped to the essentials — no dependencies beyond ASP.NET Core itself.
Targets net8.0, net9.0, and net10.0.
Table of Contents
Features
- Auto-discovers all
IEndpointimplementations at startup via reflection — once, not per request - Works across multiple assemblies for modular monolith and vertical slice layouts
TryAddEnumerableregistration prevents duplicates if the same assembly is scanned more than once- No configuration required, no base classes, no attributes
Installation
dotnet add package Pandatech.FluentMinimalApiMapper
Getting Started
1. Define an endpoint
public class ProductEndpoints : IEndpoint
{
public void AddRoutes(IEndpointRouteBuilder app)
{
app.MapGet("/products", () => Results.Ok());
app.MapPost("/products", () => Results.Created());
}
}
2. Register and map in Program.cs
builder.AddMinimalApis(); // scans entry assembly by default
var app = builder.Build();
app.MapMinimalApis();
app.Run();
That's all. Every IEndpoint implementation in the entry assembly is discovered and registered automatically.
Multiple Assemblies
Pass any number of assemblies explicitly — useful in modular monolith setups where each module lives in its own project:
builder.AddMinimalApis(
typeof(ProductEndpoints).Assembly,
typeof(OrderEndpoints).Assembly);
Route Grouping
Pass a RouteGroupBuilder to MapMinimalApis to apply shared configuration (prefix, auth policy, filters, etc.)
to all discovered endpoints at once:
var api = app.MapGroup("/api/v1").RequireAuthorization();
app.MapMinimalApis(api);
Or apply multiple group configurations selectively by calling MapMinimalApis more than once with different groups,
scanning different assemblies each time.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Pandatech.FluentMinimalApiMapper:
| Package | Downloads |
|---|---|
|
Pandatech.SharedKernel
Opinionated ASP.NET Core 10 infrastructure kernel: OpenAPI (Swagger + Scalar), Serilog, MediatR, FluentValidation, CORS, SignalR, OpenTelemetry, health checks, maintenance mode, resilience pipelines, and shared utilities. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Multi-target net8.0/net9.0/net10.0, switched to FrameworkReference