Voyager.Common.Proxy.Server.OpenApi
1.12.1-preview.4
dotnet add package Voyager.Common.Proxy.Server.OpenApi --version 1.12.1-preview.4
NuGet\Install-Package Voyager.Common.Proxy.Server.OpenApi -Version 1.12.1-preview.4
<PackageReference Include="Voyager.Common.Proxy.Server.OpenApi" Version="1.12.1-preview.4" />
<PackageVersion Include="Voyager.Common.Proxy.Server.OpenApi" Version="1.12.1-preview.4" />
<PackageReference Include="Voyager.Common.Proxy.Server.OpenApi" />
paket add Voyager.Common.Proxy.Server.OpenApi --version 1.12.1-preview.4
#r "nuget: Voyager.Common.Proxy.Server.OpenApi, 1.12.1-preview.4"
#:package Voyager.Common.Proxy.Server.OpenApi@1.12.1-preview.4
#addin nuget:?package=Voyager.Common.Proxy.Server.OpenApi&version=1.12.1-preview.4&prerelease
#tool nuget:?package=Voyager.Common.Proxy.Server.OpenApi&version=1.12.1-preview.4&prerelease
Voyager.Common.Proxy.Server.OpenApi
Native Microsoft.AspNetCore.OpenApi integration for Voyager.Common.Proxy.Server — automatically generates OpenAPI 3.1 documents from service interfaces, without Swashbuckle.
Targets net10.0 only. For older frameworks use the Swashbuckle-based
Voyager.Common.Proxy.Server.Swagger. See ADR-020 Phase 3.
Installation
dotnet add package Voyager.Common.Proxy.Server.OpenApi
Quick Start
using Voyager.Common.Proxy.Server.AspNetCore;
using Voyager.Common.Proxy.Server.OpenApi;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddScoped<IUserService, UserService>();
builder.Services.AddOpenApi(options =>
{
options.AddServiceProxy<IUserService>();
options.AddServiceProxy<IOrderService>();
});
var app = builder.Build();
app.MapOpenApi(); // serves /openapi/v1.json by default
app.MapServiceProxy<IUserService>();
app.MapServiceProxy<IOrderService>();
app.Run();
How it works
AddServiceProxy<TService>() registers an IOpenApiDocumentTransformer that:
- Runs
ServiceProxySwaggerGenerator(fromServer.Swagger.Core, shared with the Swashbuckle integration) to collectPathDefinitionandSchemaDefinitionobjects for every method onTService. - Converts those to
OpenApiOperation/OpenApiSchemaand attaches them to the document the ASP.NET Core OpenAPI pipeline produces. - Populates
document.Components.Schemaswith named object schemas (and emits$reffor reused types).
Because we reuse the same platform-agnostic model that Server.Swagger consumes, documents produced by this package describe the same paths, parameters, and schemas as the Swashbuckle-based documents — there is no semantic drift between the two.
Why a separate package
Microsoft.AspNetCore.OpenApiis net9+ (stable on net10) and carries no external dependency on Swashbuckle.- Publishing as a net10-only package keeps the Swashbuckle dependency off consumers who have migrated fully to net10.
- Both packages can coexist in a multi-target host if needed.
Compared with Voyager.Common.Proxy.Server.Swagger
| Aspect | Server.Swagger |
Server.OpenApi |
|---|---|---|
| Package | Swashbuckle.AspNetCore | Microsoft.AspNetCore.OpenApi (built-in) |
| TFMs | net8.0, net10.0 | net10.0 only |
| Document hook | IDocumentFilter |
IOpenApiDocumentTransformer |
| Schema generation | Delegates to Swashbuckle for CLR types | Delegates CLR-type schemas to OpenApiDocumentTransformerContext.GetOrCreateSchemaAsync(Type) (schemas registered via this method also flow through any registered IOpenApiSchemaTransformer); builds inline schemas only as a fallback for synthetic definitions without a CLR type (e.g. the shared error-response schema) |
| Extension | SwaggerGenOptions.AddServiceProxy<T>() |
OpenApiOptions.AddServiceProxy<T>() |
Target Frameworks
net10.0
| 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. |
-
net10.0
- Microsoft.AspNetCore.OpenApi (>= 10.0.0)
- Voyager.Common.Proxy.Server.Swagger.Core (>= 1.12.1-preview.4)
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.12.1-preview.4 | 0 | 4/23/2026 |
| 1.12.1-preview.1 | 0 | 4/24/2026 |