Koalesce.OpenAPI 1.0.0-alpha.4

This is a prerelease version of Koalesce.OpenAPI.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Koalesce.OpenAPI --version 1.0.0-alpha.4
                    
NuGet\Install-Package Koalesce.OpenAPI -Version 1.0.0-alpha.4
                    
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="Koalesce.OpenAPI" Version="1.0.0-alpha.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Koalesce.OpenAPI" Version="1.0.0-alpha.4" />
                    
Directory.Packages.props
<PackageReference Include="Koalesce.OpenAPI" />
                    
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 Koalesce.OpenAPI --version 1.0.0-alpha.4
                    
#r "nuget: Koalesce.OpenAPI, 1.0.0-alpha.4"
                    
#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 Koalesce.OpenAPI@1.0.0-alpha.4
                    
#: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=Koalesce.OpenAPI&version=1.0.0-alpha.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Koalesce.OpenAPI&version=1.0.0-alpha.4&prerelease
                    
Install as a Cake Tool

🐨 Koalesce

Koalesce is a .NET library designed to merge multiple API definitions into a unified document. It enables seamless API Gateway integration and simplifies frontend client generation for microservices-based architectures.


How It Works?

  • Koalesce fetches API definitions from the specified Sources.
  • It then merges them using supported providers, generating a single schema at MergedDocumentPath.
  • The final Koalesced API definition is serialized and available in JSON or YAML format.

⚡ Key Features

  • ✅ Coalesce multiple API definitions into one unified schema.
  • Agnostic Core: Designed to support future formats beyond OpenAPI.
  • Fail-Fast Validation: Validates URLs and paths at startup to prevent runtime errors.
  • Gateway Security Integration: Define a single authentication source of truth for your API Gateway.
  • ✅ Fully configurable via appsettings.json or Fluent API.
  • ✅ Aligns perfectly with API Gateways (Ocelot, YARP).
  • ✅ Allows output a json or yaml merged document regardless the document type of the source APIs.
  • ✅ Streamlines API client generation (e.g., NSwag, Kiota) since it results in one unified schema.
  • Multi-targeting: Native support for .NET 8.0 (LTS) and .NET 10.0.

📦 Installation

Koalesce for OpenAPI Middleware (ASP.NET Core)
dotnet add package Koalesce.OpenAPI
🟢 Koalesce.OpenAPI.CLI as a Global Tool
dotnet tool install --global Koalesce.OpenAPI.CLI

Configuration

1. Configure appsettings.json

"Koalesce": {
  "Sources": [
    { "Url": "https://service-a/swagger/v1/swagger.json" },
    { "Url": "https://service-b/swagger/v1/swagger.json" }
  ],
  "MergedDocumentPath": "/swagger/v1/gateway.json",
  "OpenApiVersion": "3.0.1",
  "ApiGatewayBaseUrl": "https://localhost:5000"
}

2. Register Services

// Program.cs
builder.Services.AddKoalesce(builder.Configuration)
    .ForOpenAPI(options => 
    {
        // Optional: Configure Gateway Security (e.g., JWT)
        options.UseJwtBearerGatewaySecurity(
            description: "Enter your JWT token",
            bearerFormat: "JWT"
        );
    });

3. Enable Middleware

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

💻 Using Koalesce.OpenAPI through CLI (Command Line Interface)

The Koalesce.OpenAPI.CLI tool was built specifically to allow the usage of Koalesce for merging OpenAPI definitions directly into a file in the disk, without the need for a .NET application hosting the middleware.

koalesce --config ./appsettings.json --output ./gateway.yaml --verbose

📚 Documentation

For a comprehensive guide and advanced configuration options, please visit the GitHub Repository.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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
1.0.0-alpha.12 136 1/28/2026 1.0.0-alpha.12 is deprecated.
1.0.0-alpha.11 84 1/26/2026
1.0.0-alpha.10 95 1/23/2026
1.0.0-alpha.9 87 1/22/2026
1.0.0-alpha.8 84 1/20/2026
1.0.0-alpha.7 83 1/20/2026
1.0.0-alpha.6 79 1/18/2026
1.0.0-alpha.5 90 1/16/2026
1.0.0-alpha.4 90 1/14/2026
1.0.0-alpha.3 99 1/11/2026
1.0.0-alpha.2 90 1/5/2026
1.0.0-alpha.1 92 1/2/2026
0.1.1-alpha.2 327 4/11/2025
0.1.1-alpha.1 177 4/10/2025
0.1.0-alpha 245 3/16/2025