DynamicEndpoints 0.2.0
See the version list below for details.
dotnet add package DynamicEndpoints --version 0.2.0
NuGet\Install-Package DynamicEndpoints -Version 0.2.0
<PackageReference Include="DynamicEndpoints" Version="0.2.0" />
<PackageVersion Include="DynamicEndpoints" Version="0.2.0" />
<PackageReference Include="DynamicEndpoints" />
paket add DynamicEndpoints --version 0.2.0
#r "nuget: DynamicEndpoints, 0.2.0"
#:package DynamicEndpoints@0.2.0
#addin nuget:?package=DynamicEndpoints&version=0.2.0
#tool nuget:?package=DynamicEndpoints&version=0.2.0
DynamicEndpoints
Runtime-defined HTTP endpoints for ASP.NET Core. Click it in a panel â it's live. Restart the app â it's still there.
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-datawith 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.
Learn more
- ð Documentation, screenshots & sample app
- ð Changelog
- ð Issues
| 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
- 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.