SwaggerUi.OpenApi
0.4.0
See the version list below for details.
dotnet add package SwaggerUi.OpenApi --version 0.4.0
NuGet\Install-Package SwaggerUi.OpenApi -Version 0.4.0
<PackageReference Include="SwaggerUi.OpenApi" Version="0.4.0" />
<PackageVersion Include="SwaggerUi.OpenApi" Version="0.4.0" />
<PackageReference Include="SwaggerUi.OpenApi" />
paket add SwaggerUi.OpenApi --version 0.4.0
#r "nuget: SwaggerUi.OpenApi, 0.4.0"
#:package SwaggerUi.OpenApi@0.4.0
#addin nuget:?package=SwaggerUi.OpenApi&version=0.4.0
#tool nuget:?package=SwaggerUi.OpenApi&version=0.4.0
SwaggerUi.OpenApi
A package to simplify adding Swagger UI to .NET 9's Microsoft.AspNetCore.OpenApi.
Usage
In your Program.cs
file Add app.AddSwaggerUi()
and app.MapSwaggerUi()
:
builder.Services.AddOpenApi();
builder.Services.AddSwaggerUi();
var app = builder.Build();
app.MapOpenApi();
app.MapSwaggerUi();
If you want to add authentication to your Swagger you can use following helper methods:
builder.Services.AddOpenApi("v1", o =>
{
o.AddOAuth2(authorizationUrl, tokenUrl, scopes);
});
builder.Services.AddSwaggerUi("v1", o =>
{
o.AddOAuth2(clientId, scopes);
});
There are other helper methods for Duende Identity Server AddIdentityServer()
and Auth0 AddAuth0
.
You can check the samples directory for complete working examples.
Roadmap
✅ Basic UI
✅ Authentication
✅ Enable all the documents
Acknowledgement
This project is based on Swashbuckle.AspNetCore.SwaggerUI. Thanks for their awesome work.
Pre-release builds
Get the package from here.
Build
Install the required .NET SDK and run:
$ dotnet build
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- Microsoft.AspNetCore.OpenApi (>= 9.0.0-preview.4.24267.6)
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 |
---|---|---|
2.4.0 | 188 | 9/14/2025 |
2.3.0 | 344 | 8/13/2025 |
2.2.0 | 880 | 6/7/2025 |
2.1.1 | 382 | 5/14/2025 |
2.0.0 | 457 | 4/20/2025 |
1.2.0 | 570 | 4/5/2025 |
1.1.0 | 187 | 3/22/2025 |
1.0.0 | 613 | 11/24/2024 |
0.6.0 | 211 | 11/3/2024 |
0.5.0 | 217 | 6/12/2024 |
0.4.0 | 129 | 6/9/2024 |
0.3.0 | 126 | 5/29/2024 |
0.2.0 | 108 | 5/25/2024 |
0.1.0 | 136 | 5/15/2024 |