Tenon.Infra.Swagger 0.0.1-alpha-202502241449

This is a prerelease version of Tenon.Infra.Swagger.
dotnet add package Tenon.Infra.Swagger --version 0.0.1-alpha-202502241449
                    
NuGet\Install-Package Tenon.Infra.Swagger -Version 0.0.1-alpha-202502241449
                    
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="Tenon.Infra.Swagger" Version="0.0.1-alpha-202502241449" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tenon.Infra.Swagger" Version="0.0.1-alpha-202502241449" />
                    
Directory.Packages.props
<PackageReference Include="Tenon.Infra.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 Tenon.Infra.Swagger --version 0.0.1-alpha-202502241449
                    
#r "nuget: Tenon.Infra.Swagger, 0.0.1-alpha-202502241449"
                    
#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 Tenon.Infra.Swagger@0.0.1-alpha-202502241449
                    
#: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=Tenon.Infra.Swagger&version=0.0.1-alpha-202502241449&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Tenon.Infra.Swagger&version=0.0.1-alpha-202502241449&prerelease
                    
Install as a Cake Tool

Tenon.Infra.Swagger

介绍

Tenon.Infra.Swagger 是一个用于 ASP.NET Core 应用程序的扩展库,旨在简化 Swagger 的集成和配置,特别是与 JWT 认证的结合。该库提供了便捷的方法来添加 Swagger Bearer 授权头,使得 API 文档能够清晰地展示如何使用 JWT 进行身份验证。

示例代码

以下是如何在 ASP.NET Core 项目中使用 Tenon.Infra.Swagger 的示例代码:

using Microsoft.Extensions.DependencyInjection;
using Tenon.Infra.Swagger.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// 添加 Swagger Bearer 授权头
services.AddSwaggerBearerAuthorizationHeader();
// 其他服务配置...
}
// 其他方法...
}

通过调用 AddSwaggerBearerAuthorizationHeader 方法,您可以轻松地将 JWT 认证集成到 Swagger 文档中,确保 API 用户能够理解如何进行身份验证。

Product 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. 
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
0.0.1-alpha-202502241449 124 2/24/2025
0.0.1-alpha-202502101554 122 2/10/2025
0.0.1-alpha-202502101448 129 2/10/2025
0.0.1-alpha-202502101434 114 2/10/2025
0.0.1-alpha-202501130258 97 1/13/2025
0.0.1-alpha-202412311524 126 12/31/2024
0.0.1-alpha-202412061617 112 12/6/2024
0.0.1-alpha-202412051527 108 12/5/2024
0.0.1-alpha-202412051432 109 12/5/2024
0.0.1-alpha-202412041445 110 12/4/2024
0.0.1-alpha-202412021409 108 12/2/2024
0.0.1-alpha-202411301019 101 11/30/2024
0.0.1-alpha-202411170525 106 11/17/2024
0.0.1-alpha-202411161309 99 11/16/2024
0.0.1-alpha-202411131604 107 11/13/2024
0.0.1-alpha-202411111439 115 11/11/2024
0.0.1-alpha-202411051434 103 11/5/2024
0.0.1-alpha-202410281339 108 10/28/2024
0.0.1-alpha-202410131500 112 10/13/2024
0.0.1-alpha-202407261457 116 7/26/2024
Loading failed