MinimalCleanArch.Extensions 0.1.18-preview

This is a prerelease version of MinimalCleanArch.Extensions.
dotnet add package MinimalCleanArch.Extensions --version 0.1.18-preview
                    
NuGet\Install-Package MinimalCleanArch.Extensions -Version 0.1.18-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MinimalCleanArch.Extensions" Version="0.1.18-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MinimalCleanArch.Extensions" Version="0.1.18-preview" />
                    
Directory.Packages.props
<PackageReference Include="MinimalCleanArch.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MinimalCleanArch.Extensions --version 0.1.18-preview
                    
#r "nuget: MinimalCleanArch.Extensions, 0.1.18-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MinimalCleanArch.Extensions@0.1.18-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MinimalCleanArch.Extensions&version=0.1.18-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MinimalCleanArch.Extensions&version=0.1.18-preview&prerelease
                    
Install as a Cake Tool

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.Validation for 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/Error mapping to RFC 7807.
  • Result mapping: Result/Error to IResult helpers for expected API outcomes (MatchHttp, ToProblem).
  • OpenAPI helpers: standard response definitions and filters.
  • Rate limiting: global and named endpoint policies with consistent 429 responses.
  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed