Hlibz.MinimalApi.Endpoints
1.0.0-preview.2
See the version list below for details.
dotnet add package Hlibz.MinimalApi.Endpoints --version 1.0.0-preview.2
NuGet\Install-Package Hlibz.MinimalApi.Endpoints -Version 1.0.0-preview.2
<PackageReference Include="Hlibz.MinimalApi.Endpoints" Version="1.0.0-preview.2" />
<PackageVersion Include="Hlibz.MinimalApi.Endpoints" Version="1.0.0-preview.2" />
<PackageReference Include="Hlibz.MinimalApi.Endpoints" />
paket add Hlibz.MinimalApi.Endpoints --version 1.0.0-preview.2
#r "nuget: Hlibz.MinimalApi.Endpoints, 1.0.0-preview.2"
#:package Hlibz.MinimalApi.Endpoints@1.0.0-preview.2
#addin nuget:?package=Hlibz.MinimalApi.Endpoints&version=1.0.0-preview.2&prerelease
#tool nuget:?package=Hlibz.MinimalApi.Endpoints&version=1.0.0-preview.2&prerelease
![]()
Hlibz.MinimalApi.Endpoints
One class per minimal API endpoint, found and mapped for you, with its OpenAPI responses documented from what the endpoint is.
dotnet add package Hlibz.MinimalApi.Endpoints
internal sealed class OrdersEndpointGroup : IEndpointGroup
{
public string Prefix => "api/orders";
public void Configure(RouteGroupBuilder group) => group.WithTags("Orders");
}
internal sealed class GetOrderEndpoint : IEndpoint<OrdersEndpointGroup, OrderDto>
{
public RouteHandlerBuilder Map(IEndpointRouteBuilder group) =>
group.MapGet("{id:int}", Handle)
.RequireAuthorization("Member")
.ProducesErrors(StatusCodes.Status404NotFound);
private static Results<Ok<OrderDto>, NotFound> Handle(int id, IOrderService orders) =>
orders.Find(id) is { } order ? TypedResults.Ok(order) : TypedResults.NotFound();
}
app.MapEndpoints(typeof(Program).Assembly);
Map is a plain minimal API chain. The endpoint is mapped into its group, named GetOrder,
and documents 200 as OrderDto (from the handler's return type) plus 404, and
401/403 because it ends up requiring authorization. 429 is documented whenever it ends
up rate limited, 413 for uploads (.AcceptsUpload(maxBytes)), and file downloads via
.ProducesFile(contentType). The endpoint class's XML <summary> becomes the operation
description, read by the generator at compile time (no documentation file needed). Errors use ProblemDetails unless you set your own
(options.UseErrorResponse<TError>()); app-wide rules go in group and endpoint conventions
(options.ConfigureGroups<IAdminEndpointGroup>(...)).
Endpoints are listed and checked at compile time by a source generator and analyzer that ship
inside the package: no assembly scan at startup, and an endpoint that can't be mapped (no
group, no parameterless constructor, a Map that doesn't map exactly one route, a handler
that doesn't return TResponse, ...) is a build error rather than a startup failure.
Request validation: Hlibz.MinimalApi.Endpoints.FluentValidation.
Full documentation and a sample: https://github.com/hlib-zinchenko/Hlibz.MinimalApi.Endpoints.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Hlibz.MinimalApi.Endpoints:
| Package | Downloads |
|---|---|
|
Hlibz.MinimalApi.Endpoints.FluentValidation
Automatic FluentValidation for Hlibz.MinimalApi.Endpoints: options.AddFluentValidation() attaches a validation filter to every endpoint whose handler takes a parameter with an IValidator<T> registered, and documents its 400. Nothing to opt into per endpoint. The failure is a validation problem by default, or whatever result your API returns (e.g. Hlibz.Results' result.ToErrorResult().ToHttpResult()). Validators resolve per request, so any lifetime works. Works with FluentValidation 11.0.0 and later. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 150 | 11/18/2026 |
| 1.0.0-preview.7 | 88 | 11/14/2026 |
| 1.0.0-preview.6 | 69 | 11/13/2026 |
| 1.0.0-preview.5 | 75 | 11/13/2026 |
| 1.0.0-preview.4 | 69 | 11/13/2026 |
| 1.0.0-preview.3 | 68 | 11/13/2026 |
| 1.0.0-preview.2 | 63 | 11/12/2026 |
| 1.0.0-preview.1 | 69 | 11/11/2026 |