Nabs.Launchpad.Core.Apis 10.0.248

Prefix Reserved
There is a newer version of this package available.
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
                    
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="Nabs.Launchpad.Core.Apis" Version="10.0.248" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nabs.Launchpad.Core.Apis" Version="10.0.248" />
                    
Directory.Packages.props
<PackageReference Include="Nabs.Launchpad.Core.Apis" />
                    
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 Nabs.Launchpad.Core.Apis --version 10.0.248
                    
#r "nuget: Nabs.Launchpad.Core.Apis, 10.0.248"
                    
#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 Nabs.Launchpad.Core.Apis@10.0.248
                    
#: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=Nabs.Launchpad.Core.Apis&version=10.0.248
                    
Install as a Cake Addin
#tool nuget:?package=Nabs.Launchpad.Core.Apis&version=10.0.248
                    
Install as a Cake Tool

NuGet

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 ValidationProblem responses
  • 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/file
  • NabsEndpointBase.cs - declarative base class with override-driven configuration
  • NabsEndpointBaseOfT.cs - typed base for request/response endpoints (use NabsNone for missing request or response payloads)
  • NabsNone.cs - marker type representing no request or no response payload
  • NabsEndpointRouteBuilderExtensions.cs - endpoint discovery and mapping extensions
  • NabsControllerBase.cs - reusable base class for controller-based APIs

License

Copyright (c) Net Advantage Business Solutions.

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.

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 10.0.217 is deprecated because it is no longer maintained.
Loading failed