MinimalOpenAPI 1.0.0
dotnet add package MinimalOpenAPI --version 1.0.0
NuGet\Install-Package MinimalOpenAPI -Version 1.0.0
<PackageReference Include="MinimalOpenAPI" Version="1.0.0" />
<PackageVersion Include="MinimalOpenAPI" Version="1.0.0" />
<PackageReference Include="MinimalOpenAPI" />
paket add MinimalOpenAPI --version 1.0.0
#r "nuget: MinimalOpenAPI, 1.0.0"
#:package MinimalOpenAPI@1.0.0
#addin nuget:?package=MinimalOpenAPI&version=1.0.0
#tool nuget:?package=MinimalOpenAPI&version=1.0.0
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
allOfflattening readOnlyandwriteOnlyrequest/response contract splitting- path, query, header, reusable, and path-level parameters
- parameter default values
- typed results and
application/problem+jsonwrappers multipart/form-data,IFormFile, multiple files, and nested form objects- deterministic schema-name normalization with compile-time collision diagnostics
- explicit schema publication through
PublishAsandMapOpenApiSchemas()
Directional contracts
<OpenApi Include="openapi.yaml"
ReadWriteSchemaHandling="Auto" />
Ignorekeeps neutral contracts.Autocreates request/response variants only when reachablereadOnlyorwriteOnlyproperties require different shapes.Splitalways 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:
| 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. |
-
.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 |