Pandatech.FluentMinimalApiMapper
3.0.1
dotnet add package Pandatech.FluentMinimalApiMapper --version 3.0.1
NuGet\Install-Package Pandatech.FluentMinimalApiMapper -Version 3.0.1
<PackageReference Include="Pandatech.FluentMinimalApiMapper" Version="3.0.1" />
<PackageVersion Include="Pandatech.FluentMinimalApiMapper" Version="3.0.1" />
<PackageReference Include="Pandatech.FluentMinimalApiMapper" />
paket add Pandatech.FluentMinimalApiMapper --version 3.0.1
#r "nuget: Pandatech.FluentMinimalApiMapper, 3.0.1"
#:package Pandatech.FluentMinimalApiMapper@3.0.1
#addin nuget:?package=Pandatech.FluentMinimalApiMapper&version=3.0.1
#tool nuget:?package=Pandatech.FluentMinimalApiMapper&version=3.0.1
Pandatech.FluentMinimalApiMapper
A lightweight, dependency-free helper for auto-discovering and mapping Minimal API endpoints across your assemblies.
FluentMinimalApiMapper was inspired by Carter's routing concept but focuses purely on endpoint mapping, ideal for * modular monolithic* and clean architecture solutions.
✨ Features
- 🚀 Auto-discovers all
IEndpointimplementations via reflection. - 🧩 Works seamlessly across multiple assemblies or modules.
- 🔄 Zero configuration, minimal boilerplate.
- ⚙️ Optional assembly scanning (defaults to EntryAssembly).
📦 Installation
dotnet add package Pandatech.FluentMinimalApiMapper
🧭 Quick Start
1️⃣ Define an endpoint
using FluentMinimalApiMapper;
using Microsoft.AspNetCore.Routing;
public class MyEndpoint : IEndpoint
{
public void AddRoutes(IEndpointRouteBuilder app)
{
app.MapGet("/hello", () => "Hello, world!");
}
}
2️⃣ Register endpoints in Program.cs
Single assembly
using FluentMinimalApiMapper;
var builder = WebApplication.CreateBuilder(args);
builder.AddMinimalApis();
var app = builder.Build();
app.MapMinimalApis();
app.Run();
Multiple assemblies (modular setup)
using FluentMinimalApiMapper;
var builder = WebApplication.CreateBuilder(args);
builder.AddMinimalApis(typeof(MyEndpoint).Assembly, typeof(OtherModuleEndpoint).Assembly);
var app = builder.Build();
app.MapMinimalApis();
app.Run();
⚙️ Advanced
Route grouping / versioning
You can pass a RouteGroupBuilder to group endpoints:
var generalApiPolicy = app.MapGroup("").DisableAntiForgery();
app.MapMinimalApis(generalApiPolicy);
💡 Notes
- Reflection happens once at startup—negligible in most cases.
- Uses
TryAddEnumerableto prevent duplicate registrations. - Works seamlessly with dependency injection and test hosts.
📄 License
Licensed under the MIT License.
Copyright Pandatech
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Microsoft.AspNetCore.OpenApi (>= 10.0.2)
- Pandatech.Analyzers (>= 2.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Pandatech.FluentMinimalApiMapper:
| Package | Downloads |
|---|---|
|
Pandatech.SharedKernel
Pandatech.SharedKernel provides centralized configurations, utilities, and extensions for ASP.NET Core projects. For more information refere to readme.md document. |
GitHub repositories
This package is not used by any popular GitHub repositories.
nuget updates