Nabs.Launchpad.Core.Apis
10.0.248
Prefix Reserved
See the version list below for details.
dotnet add package Nabs.Launchpad.Core.Apis --version 10.0.248
NuGet\Install-Package Nabs.Launchpad.Core.Apis -Version 10.0.248
<PackageReference Include="Nabs.Launchpad.Core.Apis" Version="10.0.248" />
<PackageVersion Include="Nabs.Launchpad.Core.Apis" Version="10.0.248" />
<PackageReference Include="Nabs.Launchpad.Core.Apis" />
paket add Nabs.Launchpad.Core.Apis --version 10.0.248
#r "nuget: Nabs.Launchpad.Core.Apis, 10.0.248"
#:package Nabs.Launchpad.Core.Apis@10.0.248
#addin nuget:?package=Nabs.Launchpad.Core.Apis&version=10.0.248
#tool nuget:?package=Nabs.Launchpad.Core.Apis&version=10.0.248
Nabs.Launchpad.Core.Apis
Nabs.Launchpad.Core.Apis gives you granular endpoint abstractions for consistent ASP.NET Core API endpoints.
Installation
dotnet add package Nabs.Launchpad.Core.Apis
The Problem
// 1) Controllers accumulate many actions over time
public class ProductsController : ControllerBase
{
[HttpGet("{id:guid}")] public IActionResult Get(Guid id) => Ok();
[HttpPost] public IActionResult Create(ProductRequest request) => Ok();
[HttpPut("{id:guid}")] public IActionResult Update(Guid id, ProductRequest request) => Ok();
}
// 2) Endpoint intent is harder to isolate by file
// 3) Growth increases merge conflicts and maintenance overhead
Features
- Single-file endpoint abstraction through
INabsEndpoint - Declarative endpoint base class through
NabsEndpointBase - Typed request/response endpoint variants for common API patterns
- Constructor injection support for discovered endpoint classes
- Built-in request validation hooks with automatic
ValidationProblemresponses - Automatic endpoint registration through
MapNabsEndpoints(...) - Deterministic endpoint discovery for predictable startup behavior
- Optional shared controller base through
NabsControllerBase
Usage
public sealed class GetProductEndpoint : NabsEndpointBase
{
public GetProductEndpoint()
: base(new NabsEndpointOptions("/api/products/{id:guid}", HttpMethod.Get)
{
EndpointName = "GetProduct",
Tags = ["Products"],
Summary = "Get a product by id."
})
{
}
protected override Task<IResult> HandleAsync(HttpContext httpContext, CancellationToken cancellationToken)
{
var id = httpContext.GetRouteValue("id");
return Task.FromResult<IResult>(Results.Ok(new { id }));
}
}
public sealed class SecureProductEndpoint : NabsEndpointBase
{
private readonly IProductService _productService = productService;
public SecureProductEndpoint(IProductService productService)
: base(new NabsEndpointOptions("/api/secure-products/{id:guid}", HttpMethod.Get)
{
RequireAuthorization = true,
ExcludeFromDescription = false
})
{
_productService = productService;
}
protected override Task<IResult> HandleAsync(HttpContext httpContext, CancellationToken cancellationToken)
{
var id = httpContext.GetRouteValue("id");
return Task.FromResult<IResult>(Results.Ok(_productService.GetById(id)));
}
}
// Program.cs
app.MapNabsEndpoints<Program>();
You can still implement INabsEndpoint directly for advanced scenarios.
Typed endpoint variants are available through NabsEndpointBase<TRequest, TResponse> with NabsNone as a marker for no request or no response payload:
public sealed class CreateOrderEndpoint : NabsEndpointBase<CreateOrderRequest, CreateOrderResponse>
{
public CreateOrderEndpoint()
: base(new NabsEndpointOptions("/api/orders", HttpMethod.Post)
{
EndpointName = "CreateOrder"
})
{
}
protected override Task<CreateOrderResponse> HandleAsync(CreateOrderRequest request, CancellationToken cancellationToken)
{
return Task.FromResult(new CreateOrderResponse(Guid.NewGuid()));
}
}
public sealed class ProcessOrderEndpoint : NabsEndpointBase<ProcessOrderRequest, NabsNone>
{
public ProcessOrderEndpoint()
: base("/api/orders/process", HttpMethod.Post)
{
}
protected override Task<NabsNone> HandleAsync(ProcessOrderRequest request, CancellationToken cancellationToken)
{
return Task.FromResult(default(NabsNone));
}
}
public sealed class ValidatedOrderEndpoint : NabsEndpointBase<CreateOrderRequest, CreateOrderResponse>
{
public ValidatedOrderEndpoint()
: base("/api/orders/validated", HttpMethod.Post)
{
}
protected override Task<IDictionary<string, string[]>?> ValidateRequestAsync(CreateOrderRequest request, CancellationToken cancellationToken)
{
if (!string.IsNullOrWhiteSpace(request.CustomerName))
{
return Task.FromResult<IDictionary<string, string[]>?>(null);
}
IDictionary<string, string[]> errors = new Dictionary<string, string[]>
{
["customerName"] = ["Customer name is required."]
};
return Task.FromResult<IDictionary<string, string[]>?>(errors);
}
protected override Task<CreateOrderResponse> HandleAsync(CreateOrderRequest request, CancellationToken cancellationToken)
{
return Task.FromResult(new CreateOrderResponse(Guid.NewGuid()));
}
}
public sealed class GetServerInfoEndpoint : NabsEndpointBase<NabsNone, ServerInfoResponse>
{
public GetServerInfoEndpoint()
: base("/api/server-info", HttpMethod.Get)
{
}
protected override Task<ServerInfoResponse> HandleAsync(NabsNone request, CancellationToken cancellationToken)
{
return Task.FromResult(new ServerInfoResponse("v1"));
}
}
Controller-based APIs remain supported:
[ApiController]
[Route("api/[controller]")]
public sealed class ProductsController : NabsControllerBase
{
[HttpGet("{id:guid}")]
public IActionResult Get(Guid id) => Ok(new { id });
}
Configuration
No package-specific configuration is required.
NabsEndpointOptions supports one or more HttpMethod values and validates them against a supported set: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, TRACE, and CONNECT. When multiple methods are configured, only GET, HEAD, and OPTIONS combinations are allowed.
Project Structure
INabsEndpoint.cs- contract for one endpoint per class/fileNabsEndpointBase.cs- declarative base class with override-driven configurationNabsEndpointBaseOfT.cs- typed base for request/response endpoints (useNabsNonefor missing request or response payloads)NabsNone.cs- marker type representing no request or no response payloadNabsEndpointRouteBuilderExtensions.cs- endpoint discovery and mapping extensionsNabsControllerBase.cs- reusable base class for controller-based APIs
License
Copyright (c) Net Advantage Business Solutions.
| 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
- Ardalis.Result (>= 10.1.0)
- FluentValidation (>= 12.1.1)
- Microsoft.AspNetCore.OpenApi (>= 10.0.8)
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 | |
|---|---|---|---|
| 10.0.249 | 0 | 6/6/2026 | |
| 10.0.248 | 0 | 6/6/2026 | |
| 10.0.247 | 0 | 6/6/2026 | |
| 10.0.246 | 7 | 6/6/2026 | |
| 10.0.242 | 42 | 6/4/2026 | |
| 10.0.241 | 41 | 6/4/2026 | |
| 10.0.240 | 44 | 6/4/2026 | |
| 10.0.239 | 80 | 6/3/2026 | |
| 10.0.234 | 90 | 5/31/2026 | |
| 10.0.233 | 92 | 5/31/2026 | |
| 10.0.232 | 89 | 5/30/2026 | |
| 10.0.230 | 93 | 5/30/2026 | |
| 10.0.229 | 91 | 5/30/2026 | |
| 10.0.228 | 89 | 5/30/2026 | |
| 10.0.226 | 97 | 4/26/2026 | |
| 10.0.221 | 109 | 2/3/2026 | |
| 10.0.220 | 111 | 1/14/2026 | |
| 10.0.219 | 124 | 1/5/2026 | |
| 10.0.218 | 115 | 1/4/2026 | |
| 10.0.217 | 136 | 1/4/2026 |