MinimalOpenAPI 1.0.0

dotnet add package MinimalOpenAPI --version 1.0.0
                    
NuGet\Install-Package MinimalOpenAPI -Version 1.0.0
                    
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="MinimalOpenAPI" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MinimalOpenAPI" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MinimalOpenAPI" />
                    
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 MinimalOpenAPI --version 1.0.0
                    
#r "nuget: MinimalOpenAPI, 1.0.0"
                    
#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 MinimalOpenAPI@1.0.0
                    
#: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=MinimalOpenAPI&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MinimalOpenAPI&version=1.0.0
                    
Install as a Cake Tool

MinimalOpenAPI

MinimalOpenAPI is a contract-first OpenAPI framework for ASP.NET Core Minimal APIs.

You author an OpenAPI 3.0 or 3.1 document in YAML or JSON. At build time, MinimalOpenAPI generates the C# contracts, handler base classes, dependency-injection registration, and endpoint mapping required to implement the API.

Requirements

  • .NET 10
  • ASP.NET Core

Minimal setup

<ItemGroup>
  <PackageReference Include="MinimalOpenAPI" Version="1.0.0" />
  <OpenApi Include="openapi.yaml" />
</ItemGroup>
using MinimalOpenAPI;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMinimalOpenApi();

var app = builder.Build();
app.MapMinimalOpenApiEndpoints();
app.Run();

Implement the generated <OperationId>EndpointBase class for each operation. No manual route or handler registration is required.

What the package includes

  • Roslyn incremental source generator
  • ASP.NET Core runtime services
  • YAML and JSON OpenAPI parsers
  • contract records and enums
  • typed handler signatures and results
  • abstract endpoint configuration base classes applied after contract metadata
  • authored-schema publishing support

MinimalOpenAPI is the only package consumers need. Parser and abstraction assemblies are bundled as implementation details.

Selected features

  • OpenAPI 3.0 and 3.1
  • YAML and JSON documents
  • multiple documents per project
  • component and inline object schemas
  • inline objects used as array items
  • enums, dictionaries, validation metadata, and allOf flattening
  • readOnly and writeOnly request/response contract splitting
  • path, query, header, reusable, and path-level parameters
  • parameter default values
  • typed results and application/problem+json wrappers
  • multipart/form-data, IFormFile, multiple files, and nested form objects
  • deterministic schema-name normalization with compile-time collision diagnostics
  • explicit schema publication through PublishAs and MapOpenApiSchemas()

Directional contracts

<OpenApi Include="openapi.yaml"
         ReadWriteSchemaHandling="Auto" />
  • Ignore keeps neutral contracts.
  • Auto creates request/response variants only when reachable readOnly or writeOnly properties require different shapes.
  • Split always generates request and response graphs from operation body roots.

Publishing authored schemas

<OpenApi Include="openapi.yaml"
         PublishAs="/openapi/schema.yaml"
         DisplayName="Todo API"
         DisplayVersion="1.0.0" />
app.MapMinimalOpenApiEndpoints();
var schemas = app.MapOpenApiSchemas();

The returned descriptors can be used to configure Swagger UI, Scalar, or another OpenAPI viewer. MinimalOpenAPI serves the authored document; it does not generate a second document from C# at runtime.

More documentation

Full documentation, samples, limitations, architecture notes, and release guidance are available in the repository:

https://github.com/Kralizek/MinimalOpenApi

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.
  • .NETStandard 2.0

    • No dependencies.
  • net10.0

    • No dependencies.

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
1.0.0 123 7/15/2026
1.0.0-rc.4 55 7/15/2026
1.0.0-rc.3 59 7/14/2026
1.0.0-rc.2 88 6/22/2026
1.0.0-rc.1 76 5/25/2026
1.0.0-beta.11 68 5/20/2026
1.0.0-beta.10 69 5/11/2026
1.0.0-beta.9 75 5/9/2026
1.0.0-beta.8 76 4/18/2026
1.0.0-beta.7 70 4/7/2026
1.0.0-beta.6 70 4/6/2026
1.0.0-beta.5 70 4/5/2026
1.0.0-beta.4 73 4/5/2026
1.0.0-beta.3 74 4/5/2026
1.0.0-beta.2 75 4/4/2026
1.0.0-alpha 108 3/30/2026