ResQ.BuildingBlocks.Adapters.Web 0.2.0

dotnet add package ResQ.BuildingBlocks.Adapters.Web --version 0.2.0
                    
NuGet\Install-Package ResQ.BuildingBlocks.Adapters.Web -Version 0.2.0
                    
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="ResQ.BuildingBlocks.Adapters.Web" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ResQ.BuildingBlocks.Adapters.Web" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ResQ.BuildingBlocks.Adapters.Web" />
                    
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 ResQ.BuildingBlocks.Adapters.Web --version 0.2.0
                    
#r "nuget: ResQ.BuildingBlocks.Adapters.Web, 0.2.0"
                    
#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 ResQ.BuildingBlocks.Adapters.Web@0.2.0
                    
#: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=ResQ.BuildingBlocks.Adapters.Web&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ResQ.BuildingBlocks.Adapters.Web&version=0.2.0
                    
Install as a Cake Tool

ResQ.BuildingBlocks.Adapters.Web

The HTTP driving adapter (inbound ring) for the ResQ building blocks — a minimal-API surface that maps the domain Result/Error model to RFC 7807 ProblemDetails. Single-targets net9.0 (the built-in AddOpenApi/MapOpenApi surface is net9-only). Depends only on ResQ.BuildingBlocks.Application + ResQ.BuildingBlocks.Domain.

  • Result → HTTP: ProblemDetailsMapper (ErrorType → status, with an overrides hook and a type URI synthesized from Error.Code + docsBaseUri) and ResultExtensions (ToHttpResult/Match/Problem) built on TypedResults, so the happy path never throws.
  • Validation: ValidationEndpointFilter<TRequest> + WithValidation<TRequest>() run FluentValidation at the endpoint and return a ValidationProblem on failure.
  • Error handling: ProblemDetailsExceptionHandler (safety net behind the Result path) + ProblemDetailsConfigurator.Customize (trace/request id + Instance).
  • Correlation: CorrelationMiddleware (IMiddleware, W3C-aware) + CorrelationOptions (registered scoped by AddResqWeb).
  • Pagination: PageRequest/CursorRequest ([AsParameters]-friendly), PaginationOptions, and the experimental CursorCodec (base64url).
  • Endpoints: IEndpoint + AddResqEndpoints/MapResqEndpoints for assembly-scanned endpoint modules.
  • Versioning: AddResqApiVersioning + CreateResqVersionSet/MapVersionedGroup (Asp.Versioning, URL-segment).
  • OpenAPI: AddResqOpenApi/MapResqOpenApi (AddOpenApi + optional Scalar UI in Development).
  • CORS: AddResqCors binds an explicit allowlist and rejects * with credentials.
  • Composition: AddResqWeb + UseResqWeb register everything and wire the middleware in one fixed order: exception handling → CORS → correlation → authentication → authorization → endpoints → OpenAPI.
builder.Services.AddResqWeb(builder.Configuration);
var app = builder.Build();
app.UseResqWeb();

// An endpoint module:
public sealed class WidgetEndpoints : IEndpoint
{
    public void MapEndpoint(IEndpointRouteBuilder app)
    {
        var set = app.CreateResqVersionSet(1.0);
        var group = app.MapVersionedGroup("/api", set).MapGroup("/widgets");
        group.MapPost("", async (CreateWidgetRequest body, ISender sender) =>
            (await sender.Send(body.ToCommand())).ToHttpResult(id => TypedResults.Created($"/api/v1/widgets/{id}", id)))
            .WithValidation<CreateWidgetRequest>();
    }
}

Apache-2.0 · part of resq-software/dotnet.

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 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 342 8/16/2026