EasilyNET.WebCore.Swagger 1.5.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package EasilyNET.WebCore.Swagger --version 1.5.9                
NuGet\Install-Package EasilyNET.WebCore.Swagger -Version 1.5.9                
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="EasilyNET.WebCore.Swagger" Version="1.5.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasilyNET.WebCore.Swagger --version 1.5.9                
#r "nuget: EasilyNET.WebCore.Swagger, 1.5.9"                
#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.
// Install EasilyNET.WebCore.Swagger as a Cake Addin
#addin nuget:?package=EasilyNET.WebCore.Swagger&version=1.5.9

// Install EasilyNET.WebCore.Swagger as a Cake Tool
#tool nuget:?package=EasilyNET.WebCore.Swagger&version=1.5.9                

EasilyNET.WebCore.Swagger

将Swagger的扩展独立出来,避免WebCore的过度依赖.

如何使用?

// 添加 Swagger 服务
private const string name = $"{title}-{version}";

private const string version = "v1";
private const string title = "WebApi.Test";

builder.Services.AddSwaggerGen(c =>
{
    // 配置默认的文档信息
    c.SwaggerDoc(name, new()
    {
        Title = title,
        Version = version,
        Description = "Console.WriteLine(\"🐂🍺\")"
    });
    // 这里使用EasilyNET提供的扩展配置.
    c.EasilySwaggerGenOptions(name);
    // 配置认证方式
    c.AddSecurityDefinition("Bearer", new()
    {
        Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
        Name = "Authorization",
        In = ParameterLocation.Header,
        Type = SecuritySchemeType.ApiKey,
        Scheme = "Bearer"
    });
});

...

// 注册 Swagger 中间件
app.UseSwagger().UseSwaggerUI(c =>
{
    // 配置默认文档
    c.SwaggerEndpoint($"/swagger/{name}/swagger.json", $"{title} {version}");
    // 使用EasilyNET提供的扩展配置
    c.EasilySwaggerUIOptions();
});

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 is compatible.  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. 
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
3.24.919.92 39 9/19/2024
3.24.914.125 80 9/14/2024
3.24.914.115 73 9/14/2024
3.24.914.111 68 9/14/2024
3.24.911.95 73 9/11/2024
3.24.908.215 55 9/8/2024
3.24.904.200 66 9/4/2024
3.24.828.163 75 8/28/2024
3.24.820.173 86 8/20/2024
3.24.814.92 88 8/14/2024
3.24.812.115 88 8/12/2024
3.24.802.100 48 8/2/2024
3.24.801.162 58 8/1/2024
3.24.801.160 59 8/1/2024
3.24.730.164 48 7/30/2024
3.24.730.91 49 7/30/2024
3.24.724.91 35 7/24/2024
3.24.718.105 85 7/18/2024
3.24.716.95 72 7/16/2024
3.24.712.94 70 7/12/2024
3.24.710.14 78 7/9/2024
3.24.709.105 78 7/9/2024
3.24.704.94 95 7/4/2024
3.24.701.90 83 7/1/2024
3.24.628.114 89 6/28/2024
3.24.627.145 78 6/27/2024
3.24.620.160 89 6/20/2024
3.24.613.115 74 6/13/2024
3.24.612.95 72 6/12/2024
3.24.528.90 85 5/28/2024
3.24.522.84 85 5/22/2024
3.24.512.213 67 5/12/2024
3.24.508.112 91 5/8/2024
2.2024.428.71 81 4/28/2024
2.2024.427.1128 84 4/27/2024
2.2.72 106 4/14/2024
2.2.71 95 4/12/2024
2.2.8 74 4/26/2024
2.2.6 88 4/10/2024
2.2.5 105 3/26/2024
2.2.4 92 3/25/2024
2.2.3 104 3/24/2024
2.2.2 116 3/21/2024
2.2.1 106 3/20/2024
2.2.0 109 3/13/2024
2.1.9 120 2/21/2024
2.1.8 88 2/18/2024
2.1.7 93 2/16/2024
2.1.6 101 2/14/2024
2.1.5 92 2/14/2024
2.1.4 121 2/9/2024
2.1.3 118 2/8/2024
2.1.2 109 2/5/2024
2.1.1.2 179 12/26/2023
2.1.1.1 125 12/26/2023
2.1.1 129 12/25/2023
2.1.0 130 12/17/2023
2.0.11 177 12/6/2023
2.0.1 188 11/15/2023
2.0.0 132 11/14/2023
1.9.1 137 11/1/2023
1.9.0 145 10/19/2023
1.9.0-preview2 247 10/12/2023
1.9.0-preview1 102 10/12/2023
1.8.9 163 10/11/2023
1.8.8 148 10/11/2023
1.8.7-rc2 126 9/21/2023
1.8.7-rc1 108 9/12/2023
1.8.6 177 8/31/2023
1.8.5 699 8/25/2023
1.8.4 159 8/24/2023
1.8.3 156 8/23/2023
1.8.2 207 8/22/2023
1.8.1 182 8/18/2023
1.8.0 160 8/15/2023
1.7.9 185 8/11/2023
1.7.8 148 8/11/2023
1.7.7 178 8/10/2023
1.7.6 165 8/9/2023
1.7.5 211 8/9/2023
1.7.4 252 8/3/2023
1.7.3 179 8/1/2023
1.7.2 171 7/31/2023
1.7.1 148 7/27/2023
1.7.0 174 7/25/2023
1.6.9 180 7/25/2023
1.6.8 168 7/24/2023
1.6.7 194 7/20/2023
1.6.6 170 7/19/2023
1.6.5 153 7/19/2023
1.6.4 167 7/17/2023
1.6.3 158 7/17/2023
1.6.2 232 7/12/2023
1.6.1 237 6/30/2023
1.6.0 156 6/26/2023
1.5.9 189 6/22/2023
1.5.8 211 6/15/2023
1.5.7.1 199 6/14/2023
1.5.7 210 6/14/2023
1.5.6.2 211 6/7/2023
1.5.6.1 182 6/7/2023
1.5.6 179 6/7/2023
1.5.5.2 234 5/26/2023
1.5.5.1 196 5/26/2023
1.5.5 188 5/26/2023
1.5.4.4 173 5/25/2023
1.5.4.3 194 5/23/2023
1.5.4.2 268 5/17/2023
1.5.4.1 161 5/16/2023
1.5.4 251 5/11/2023
1.5.3 179 5/11/2023
1.5.2 200 5/10/2023
1.5.1 169 5/10/2023
1.5.0 217 5/6/2023
1.4.0 188 5/5/2023
1.3.9 238 4/23/2023