DynamicEndpoints 0.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DynamicEndpoints --version 0.3.0
                    
NuGet\Install-Package DynamicEndpoints -Version 0.3.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="DynamicEndpoints" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DynamicEndpoints" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="DynamicEndpoints" />
                    
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 DynamicEndpoints --version 0.3.0
                    
#r "nuget: DynamicEndpoints, 0.3.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 DynamicEndpoints@0.3.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=DynamicEndpoints&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=DynamicEndpoints&version=0.3.0
                    
Install as a Cake Tool

DynamicEndpoints

Runtime-defined HTTP endpoints for ASP.NET Core. Click it in a panel → it's live. Restart the app → it's still there.

CI License: MIT Dependencies

Admins configure endpoints (route, parameters, validation, business rules). Developers write the building blocks (processors and validators). Endpoints are real ASP.NET Core RouteEndpoints: they are created and removed at runtime, validated on save, persisted, and documented as OpenAPI 3.1.

Features

  • ðŸ”Ĩ Hot endpoints: add, change, disable and delete at runtime. The routing table swaps atomically.
  • ðŸ§Đ Declarative binding: route, query, header, JSON body and form parameters with types, defaults and request names.
  • 📎 File uploads: multipart/form-data with size and content-type limits, documented as binary in OpenAPI.
  • ðŸ›Ąïļ Validation: JSON Schema constraints, built-in formats (e-mail, URI, phone, IP, time), JsonLogic business rules and custom validators.
  • 🊝 Filters: access checks before validation, your own error format, logging and metering of rejected requests.
  • 🌍 Localized errors: English and Polish built in, overridable texts, stable error codes.
  • ⚙ïļ Processors: validated input goes to your own, statically typed code with full DI.
  • 📜 OpenAPI 3.1: generated from the definitions, ready for Swagger UI, with security schemes, common headers and hooks.
  • 🔐 First-class endpoints: authorization policies, rate limiting and conventions work as usual.
  • ðŸšĶ Safe by design: no code execution, ReDoS-proof regexes, size limits, conflict detection.
  • ðŸŠķ Zero third-party dependencies.

Quick start

builder.Services
    .AddDynamicEndpoints()
    .AddFromAssemblyContaining<Program>();          // processors, validators, seeders

var app = builder.Build();

app.MapDynamicEndpoints();                                        // the dynamic routes
app.MapDynamicEndpointsAdmin("/api/admin/endpoints")              // management REST API
   .RequireAuthorization("admin");
app.MapDynamicEndpointsOpenApi("/openapi/dynamic.json");          // OpenAPI 3.1

Define an endpoint from code (or let an admin do it through the API):

await manager.CreateAsync(DynamicEndpoint.Post("/orders")
    .HandledBy<OrderProcessor, OrderConfig>(new() { Queue = "incoming" })
    .FromHeader("tenantId", p => p.BindFrom("X-Tenant-Id").Required())
    .FromBody("quantity", p => p.Integer().Required().Range(1, 100))
    .FromBody("email", p => p.Email().Required())
    .WithRule("""{ ">=": [{ "var": "quantity" }, 10] }""", "Wholesale orders only.", "quantity"));
[DynamicProcessor("orders")]
public sealed class OrderProcessor(IBus bus) : DynamicEndpointProcessor<OrderConfig>
{
    protected override async Task<IResult> ProcessAsync(DynamicRequest request, OrderConfig config)
    {
        await bus.Send(config.Queue, request.Parameters, request.RequestAborted); // already bound & validated
        return Results.Accepted();
    }
}

The default store is in-memory. For persistence add DynamicEndpoints.EntityFrameworkCore. For FluentValidation support add DynamicEndpoints.FluentValidation. For instant propagation across instances add DynamicEndpoints.PostgreSql (LISTEN/NOTIFY) or DynamicEndpoints.Redis (pub/sub), and for tests DynamicEndpoints.Testing.

Learn more

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (9)

Showing the top 5 NuGet packages that depend on DynamicEndpoints:

Package Downloads
DynamicEndpoints.FluentValidation

Use FluentValidation validators as custom validators of DynamicEndpoints.

DynamicEndpoints.EntityFrameworkCore

Entity Framework Core for DynamicEndpoints: persistence of definitions, and the ef-crud processor that exposes allowlisted entities as CRUD endpoints scaffolded from the EF model.

DynamicEndpoints.PostgreSql

Instant propagation of DynamicEndpoints changes across instances through PostgreSQL LISTEN/NOTIFY.

DynamicEndpoints.Redis

Instant propagation of DynamicEndpoints changes across instances through Redis pub/sub.

DynamicEndpoints.Testing

Test helpers for DynamicEndpoints: in-memory store and notifications for WebApplicationFactory, and a ready-made test server.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 217 10/2/2026
0.3.0 148 10/2/2026
0.2.0 127 10/1/2026
0.1.2 133 10/1/2026
0.1.1 144 10/1/2026
0.1.0 126 10/1/2026