MinimalCleanArch.Extensions
0.1.18-preview
dotnet add package MinimalCleanArch.Extensions --version 0.1.18-preview
NuGet\Install-Package MinimalCleanArch.Extensions -Version 0.1.18-preview
<PackageReference Include="MinimalCleanArch.Extensions" Version="0.1.18-preview" />
<PackageVersion Include="MinimalCleanArch.Extensions" Version="0.1.18-preview" />
<PackageReference Include="MinimalCleanArch.Extensions" />
paket add MinimalCleanArch.Extensions --version 0.1.18-preview
#r "nuget: MinimalCleanArch.Extensions, 0.1.18-preview"
#:package MinimalCleanArch.Extensions@0.1.18-preview
#addin nuget:?package=MinimalCleanArch.Extensions&version=0.1.18-preview&prerelease
#tool nuget:?package=MinimalCleanArch.Extensions&version=0.1.18-preview&prerelease
MinimalCleanArch.Extensions
Minimal API extensions for MinimalCleanArch.
Version
- Current preview: 0.1.18-preview (net9.0, net10.0). Latest stable: 0.1.17.
Why Use It
- bootstrap a Minimal API host with a consistent pipeline instead of wiring validation, errors, OpenAPI/Scalar, rate limiting, Serilog, and related concerns by hand
- keep HTTP-specific concerns out of your domain and infrastructure packages
- standardize API behavior across generated and hand-built MCA applications
When to Use It
- use it in the API/host project when you want the MCA HTTP pipeline and service-registration defaults over ASP.NET Core Minimal APIs
- choose it when your app exposes Minimal API endpoints and you want structured error mapping and endpoint conventions
- skip it in non-HTTP projects or when you intentionally want to assemble the host without MCA API helpers
Dependency Direction
- Depends on:
MinimalCleanArch - Typically referenced by: API/host projects
- Used by:
MinimalCleanArch.Validationfor validation integration - Do not reference from: domain projects; infrastructure projects should not need it except in very host-specific composition code
Overview
- Validation: request/body validation helpers (e.g.,
WithValidation<T>()). - Error handling: standard error pipeline middleware helpers, including structured
DomainException/Errormapping to RFC 7807. - Result mapping:
Result/ErrortoIResulthelpers for expected API outcomes (MatchHttp,ToProblem). - OpenAPI helpers: standard response definitions and filters.
- Rate limiting: global and named endpoint policies with consistent
429responses. - Misc: path parameter validation, minimal API conveniences.
Usage
dotnet add package MinimalCleanArch.Extensions --version 0.1.18-preview
Recommended API bootstrap:
builder.Services.AddMinimalCleanArchApi(options =>
{
options.AddValidatorsFromAssemblyContaining<CreateTodoCommandValidator>();
options.EnableRateLimiting = true;
});
Equivalent explicit registration:
builder.Services.AddMinimalCleanArchExtensions();
builder.Services.AddValidationFromAssemblyContaining<CreateTodoCommandValidator>();
builder.Services.AddMinimalCleanArchRateLimiting();
Middleware:
app.UseMinimalCleanArchApiDefaults(options =>
{
options.UseRateLimiting = true;
});
AddMinimalCleanArchApi(...) is the preferred entry point when you want a single bootstrap method. Use the explicit registrations when you need tighter control over the service graph.
Execution-context claim mapping can be customized without replacing IExecutionContext:
builder.Services.Configure<ExecutionContextOptions>(options =>
{
options.TenantIdClaimTypes.Clear();
options.TenantIdClaimTypes.Add("business_id");
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Asp.Versioning.Http (>= 8.1.1)
- FluentValidation (>= 12.1.1)
- FluentValidation.AspNetCore (>= 11.3.1)
- FluentValidation.DependencyInjectionExtensions (>= 12.1.1)
- Microsoft.AspNetCore.OpenApi (>= 10.0.0)
- MinimalCleanArch (>= 0.1.18-preview)
- OpenTelemetry.Api (>= 1.15.0)
- OpenTelemetry.Exporter.Console (>= 1.15.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.0)
- OpenTelemetry.Extensions.Hosting (>= 1.15.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.15.0)
- OpenTelemetry.Instrumentation.Http (>= 1.15.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.15.0)
- Scalar.AspNetCore (>= 2.4.7)
- Serilog.AspNetCore (>= 9.0.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.File (>= 7.0.0)
-
net9.0
- Asp.Versioning.Http (>= 8.1.1)
- FluentValidation (>= 12.1.1)
- FluentValidation.AspNetCore (>= 11.3.1)
- FluentValidation.DependencyInjectionExtensions (>= 12.1.1)
- Microsoft.AspNetCore.OpenApi (>= 9.0.5)
- MinimalCleanArch (>= 0.1.18-preview)
- OpenTelemetry.Api (>= 1.15.0)
- OpenTelemetry.Exporter.Console (>= 1.15.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.0)
- OpenTelemetry.Extensions.Hosting (>= 1.15.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.15.0)
- OpenTelemetry.Instrumentation.Http (>= 1.15.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.15.0)
- Scalar.AspNetCore (>= 2.4.7)
- Serilog.AspNetCore (>= 9.0.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.File (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MinimalCleanArch.Extensions:
| Package | Downloads |
|---|---|
|
MinimalCleanArch.Validation
Validation components for MinimalCleanArch using FluentValidation, including extensions for service registration. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.18-preview | 25 | 3/12/2026 |
| 0.1.17 | 40 | 3/12/2026 |
| 0.1.17-preview | 94 | 3/8/2026 |
| 0.1.16-preview | 88 | 3/7/2026 |
| 0.1.15-preview | 92 | 3/3/2026 |
| 0.1.14 | 108 | 3/2/2026 |
| 0.1.14-preview | 93 | 3/1/2026 |
| 0.1.13-preview | 94 | 2/28/2026 |
| 0.1.12-preview | 116 | 2/22/2026 |
| 0.1.11-preview | 111 | 12/27/2025 |
| 0.1.10-preview | 103 | 12/27/2025 |
| 0.1.9-preview | 136 | 12/21/2025 |
| 0.1.8-preview | 242 | 12/15/2025 |
| 0.1.7 | 169 | 12/14/2025 |
| 0.1.7-preview | 428 | 12/11/2025 |
| 0.1.6 | 443 | 12/9/2025 |
| 0.1.6-preview | 497 | 12/9/2025 |
| 0.1.5 | 235 | 12/6/2025 |
| 0.1.4 | 214 | 5/26/2025 |
| 0.1.3 | 210 | 5/25/2025 |