Soenneker.Extensions.ApplicationBuilder.Swagger
4.0.98
Prefix Reserved
dotnet add package Soenneker.Extensions.ApplicationBuilder.Swagger --version 4.0.98
NuGet\Install-Package Soenneker.Extensions.ApplicationBuilder.Swagger -Version 4.0.98
<PackageReference Include="Soenneker.Extensions.ApplicationBuilder.Swagger" Version="4.0.98" />
<PackageVersion Include="Soenneker.Extensions.ApplicationBuilder.Swagger" Version="4.0.98" />
<PackageReference Include="Soenneker.Extensions.ApplicationBuilder.Swagger" />
paket add Soenneker.Extensions.ApplicationBuilder.Swagger --version 4.0.98
#r "nuget: Soenneker.Extensions.ApplicationBuilder.Swagger, 4.0.98"
#:package Soenneker.Extensions.ApplicationBuilder.Swagger@4.0.98
#addin nuget:?package=Soenneker.Extensions.ApplicationBuilder.Swagger&version=4.0.98
#tool nuget:?package=Soenneker.Extensions.ApplicationBuilder.Swagger&version=4.0.98
Soenneker.Extensions.ApplicationBuilder.Swagger
Adds Swashbuckle's Swagger JSON middleware and a Swagger UI configured for a single v1 document.
Installation
dotnet add package Soenneker.Extensions.ApplicationBuilder.Swagger
Register Swagger services
using Microsoft.OpenApi;
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Example API",
Version = "v1"
});
});
This package configures middleware only. AddSwaggerGen() and a document named v1 must already be registered.
Configure the pipeline
using Soenneker.Extensions.ApplicationBuilder.Swagger;
WebApplication app = builder.Build();
if (app.Environment.IsDevelopment())
app.ConfigureSwagger();
app.MapControllers();
app.Run();
ConfigureSwagger() provides:
- the default JSON route at
/swagger/{documentName}/swagger.json - Swagger UI at
/swagger - a UI entry for the
v1document - request-duration display and deep links in the UI
The UI uses a relative ./v1/swagger.json URL so it follows an application PathBase when hosted below a reverse-proxy subpath.
The helper does not inspect the hosting environment, require authentication, or hide the OpenAPI document. Call it only in intended environments or place suitable access controls in front of both /swagger and /swagger/v1/swagger.json; API descriptions can reveal routes, request models, and security scheme metadata even when the underlying endpoints remain authorized.
The v1 document name and /swagger UI prefix are fixed. Applications that publish multiple documents or need custom UI settings should configure UseSwagger() and UseSwaggerUI() directly.
| 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
- Swashbuckle.AspNetCore.SwaggerGen (>= 10.2.3)
- Swashbuckle.AspNetCore.SwaggerUI (>= 10.2.3)
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 |
|---|---|---|
| 4.0.98 | 52 | 8/30/2026 |
| 4.0.97 | 56 | 8/29/2026 |
| 4.0.96 | 203 | 7/28/2026 |
| 4.0.95 | 106 | 7/16/2026 |
| 4.0.94 | 295 | 6/22/2026 |
| 4.0.93 | 119 | 6/22/2026 |
| 4.0.92 | 115 | 6/20/2026 |
| 4.0.91 | 113 | 6/19/2026 |
| 4.0.90 | 116 | 6/18/2026 |
| 4.0.89 | 177 | 6/5/2026 |
| 4.0.88 | 129 | 6/1/2026 |
| 4.0.87 | 128 | 6/1/2026 |
| 4.0.86 | 152 | 5/30/2026 |
| 4.0.85 | 115 | 5/30/2026 |
| 4.0.84 | 327 | 4/22/2026 |
| 4.0.83 | 150 | 3/26/2026 |
| 4.0.82 | 115 | 3/26/2026 |
| 4.0.81 | 115 | 3/25/2026 |
| 4.0.80 | 115 | 3/24/2026 |
| 4.0.79 | 138 | 3/12/2026 |
Improve Swagger pipeline configuration