Voyager.Common.Proxy.Server.Swagger 1.7.7

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

Voyager.Common.Proxy.Server.Swagger

Swagger/OpenAPI integration for Voyager.Common.Proxy.Server on ASP.NET Core using Swashbuckle.

Installation

dotnet add package Voyager.Common.Proxy.Server.Swagger

Usage

Basic Setup

// Program.cs
builder.Services.AddSwaggerGen(options =>
{
    options.SwaggerDoc("v1", new() { Title = "My API", Version = "v1" });

    // Add service proxy endpoints to Swagger
    options.AddServiceProxy<IUserService>();
    options.AddServiceProxy<IOrderService>();
});

app.UseSwagger();
app.UseSwaggerUI();

With Service Proxy Endpoints

// Register services
builder.Services.AddScoped<IUserService, UserService>();

// Map service proxy endpoints
app.MapServiceProxy<IUserService>();

// Configure Swagger
builder.Services.AddSwaggerGen(options =>
{
    options.AddServiceProxy<IUserService>();
});

Features

  • Automatic Documentation: Generates OpenAPI documentation from service interfaces
  • Result<T> Unwrapping: Shows the actual response type, not Result<T>
  • Error Responses: Automatically documents standard error responses (400, 401, 403, 404, 409, 500)
  • Parameter Binding: Correctly identifies route, query, and body parameters
  • Schema Generation: Full JSON Schema support for complex types

How It Works

The ServiceProxyDocumentFilter<T> scans your service interface using ServiceScanner and generates OpenAPI path definitions:

  1. Each method becomes an operation with the correct HTTP method
  2. Parameters are mapped to path, query, or body based on their source
  3. Result<T> return types are unwrapped to show just T
  4. Standard error responses are added based on the Result pattern

Example Output

For this interface:

public interface IUserService
{
    Task<Result<User>> GetUserAsync(int id);
    Task<Result<User>> CreateUserAsync(CreateUserRequest request);
}

Swagger will show:

  • GET /user-service/get-user?id={id} → Returns User
  • POST /user-service/create-user → Request body: CreateUserRequest, Returns User
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 was computed.  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.  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 was computed.  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.7.8-preview.1 27 2/9/2026
1.7.7 35 2/6/2026
1.7.7-preview.1.1 29 2/6/2026