MinimalApis.Extensions 0.7.1-pre.20220712.30

.NET 6.0
This is a prerelease version of MinimalApis.Extensions.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MinimalApis.Extensions --version 0.7.1-pre.20220712.30
NuGet\Install-Package MinimalApis.Extensions -Version 0.7.1-pre.20220712.30
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="MinimalApis.Extensions" Version="0.7.1-pre.20220712.30" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MinimalApis.Extensions --version 0.7.1-pre.20220712.30
#r "nuget: MinimalApis.Extensions, 0.7.1-pre.20220712.30"
#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.
// Install MinimalApis.Extensions as a Cake Addin
#addin nuget:?package=MinimalApis.Extensions&version=0.7.1-pre.20220712.30&prerelease

// Install MinimalApis.Extensions as a Cake Tool
#tool nuget:?package=MinimalApis.Extensions&version=0.7.1-pre.20220712.30&prerelease


A set of extensions and helpers that extend the functionality of ASP.NET Core Minimal APIs.



Prerelease Builds

This package is currently available in prerelease from

> dotnet add package MinimalApis.Extensions --prerelease

CI Builds

If you wish to use builds from this repo's main branch you can install them from this repo's package feed.

  1. Create a personal access token for your GitHub account with the read:packages scope with your desired expiration length:

    <img width="583" alt="image" src="">

  2. At the command line, navigate to your user profile directory and run the following command to add the package feed to your NuGet configuration, replacing the <GITHUB_USER_NAME> and <PERSONAL_ACCESS_TOKEN> placeholders with the relevant values:

    ~> dotnet nuget add source -n GitHub -u <GITHUB_USER_NAME> -p <PERSONAL_ACCESS_TOKEN>
  3. You should now be able to add a reference to the package specifying a version from the repository packages feed

  4. See these instructions for further details about working with GitHub package feeds

Getting Started

  1. Install the NuGet package into your ASP.NET Core project:
    > dotnet add package MinimalApis.Extensions --prerelease
  2. In your project's Program.cs, call the AddEndpointsMetadataProviderApiExplorer() method on builder.Services to enable enhanced endpoint metadata in ApiExplorer:
    var builder = WebApplication.CreateBuilder(args);
    builder.Services.AddEndpointsMetadataProviderApiExplorer(); // <-- Add this line
  3. Update your Minimal APIs to use the helper binding and result types from this library, e.g.:
    app.MapPost("/todos", async Task<Results<ValidationProblem, Created<Todo>>> (Validated<Todo> input, TodoDb db) =>
        if (!input.IsValid)
            return Results.Extensions.ValidationProblem(input.Errors);
        var todo = input.Value;
        await db.SaveChangesAsync();
        return Results.Extensions.Created($"/todos/{todo.Id}", todo);

What's Included?

This library provides types that help extend the core functionality of ASP.NET Core Minimal APIs in the following ways:

  • Enhanced parameter binding
  • Typed IResult objects for easier unit testing (available via Results.Extensions)
  • Automatic population of detailed endpoint descriptions in Swagger/OpenAPI via the ability for input and result types to add to endpoint metadata via IProvideEndpointParameterMetadata and IProvideEndpointResponseMetadata
  • Union IResult return types via Results<TResult1, TResultN> that enable route handler delegates to declare all the possible IResult types they can return, enabling compile-time type checking and automatic population of possible responses in Swagger/OpenAPI

Sample Projects


An example Todos application using ASP.NET Core Minimal APIs and the Dapper library for data storage in SQLite.


Contains small examples for other types in this library.


Shows many examples of using the types in this library along with other things related to ASP.NET Core Minimal APIs.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MinimalApis.Extensions:

Package Downloads

Shared repo between repos in cloud team in Veo. No business logic, secrets or any other sensitive data in this repo only just shared functionality between repos and a few common test classes as well.

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on MinimalApis.Extensions:

Repository Stars
A place I'm trying out the new ASP.NET Core minimal APIs features.
🛍️ A practical e-commerce microservices, built with .Net 7, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
🪣 A practical e-commerce modular monolith, built with .Net 7, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
A source generator for minimal APIs
Resources related to my Pluralsight course on this topic.
Version Downloads Last updated
0.11.0 10,481 6/22/2023
0.10.1 19,160 12/21/2022
0.10.0 2,235 11/29/2022
0.9.1-pre.20221114.39 355 11/14/2022
0.9.0-pre.20221011.36 6,309 10/11/2022
0.8.0-pre.20220915.33 3,927 9/15/2022
0.7.2-pre.20220906.32 102 9/6/2022
0.7.1-pre.20220712.30 3,325 7/12/2022
0.7.0-pre.20220528.28 11,695 5/28/2022
0.6.0-pre.20220429.27 2,600 4/29/2022
0.5.2-pre.20220322.22 2,135 3/22/2022
0.5.1-pre.20220322.18 119 3/22/2022
0.5.0-pre.20220321.15 2,404 3/21/2022
0.4.1-pre.20211113.13 2,987 11/13/2021
0.4.0-pre.20211113.12 501 11/13/2021
0.3.1-pre.20211113.11 222 11/13/2021
0.3.1-pre.20211111.10 510 11/11/2021
0.3.0-pre.20211110.9 157 11/10/2021
0.1.0-pre.20211027.5 457 10/27/2021