Voyager.Common.Proxy.Server.Swagger.Owin
1.7.7
dotnet add package Voyager.Common.Proxy.Server.Swagger.Owin --version 1.7.7
NuGet\Install-Package Voyager.Common.Proxy.Server.Swagger.Owin -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.Owin" 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.Owin" Version="1.7.7" />
<PackageReference Include="Voyager.Common.Proxy.Server.Swagger.Owin" />
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.Owin --version 1.7.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Voyager.Common.Proxy.Server.Swagger.Owin, 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.Owin@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.Owin&version=1.7.7
#tool nuget:?package=Voyager.Common.Proxy.Server.Swagger.Owin&version=1.7.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Voyager.Common.Proxy.Server.Swagger.Owin
Swagger/OpenAPI integration for Voyager.Common.Proxy.Server on OWIN/.NET Framework 4.8 using Swagger-Net.
Installation
Install-Package Voyager.Common.Proxy.Server.Swagger.Owin
Usage
Basic Setup
In your SwaggerConfig.cs:
using Voyager.Common.Proxy.Server.Swagger.Owin;
public class SwaggerConfig
{
public static void Register()
{
GlobalConfiguration.Configuration
.EnableSwagger(c =>
{
c.SingleApiVersion("v1", "My API");
// Add service proxy endpoints to Swagger
c.AddServiceProxy<IUserService>();
c.AddServiceProxy<IOrderService>();
})
.EnableSwaggerUi();
}
}
With Service Proxy Middleware
// In Startup.cs
public class Startup
{
public void Configuration(IAppBuilder app)
{
var container = new UnityContainer();
container.RegisterType<IUserService, UserService>();
// Add service proxy middleware
app.Use(ServiceProxyOwinMiddleware.Create<IUserService>(
() => container.Resolve<IUserService>()));
// Configure Web API and Swagger
var config = new HttpConfiguration();
SwaggerConfig.Register();
app.UseWebApi(config);
}
}
Features
- Automatic Documentation: Generates Swagger 2.0 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 Swagger path definitions:
- Each method becomes an operation with the correct HTTP method
- Parameters are mapped to path, query, or body based on their source
Result<T>return types are unwrapped to show justT- 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}→ ReturnsUserPOST /user-service/create-user→ Request body:CreateUserRequest, ReturnsUser
Compatibility
- .NET Framework 4.8
- Swagger-Net 8.5.x
- OWIN/Katana
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Swagger-Net (>= 8.5.28.1)
- Voyager.Common.Proxy.Server.Swagger.Core (>= 1.7.7)
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.7 | 31 | 2/6/2026 |
| 1.7.7-preview.1.1 | 28 | 2/6/2026 |