EasilyNET.WebCore.Swagger 1.7.5

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

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

EasilyNET.WebCore.Swagger

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

  • 新增 Swagger 页面参数忽略.比如某些默认参数不需要调用者传入,并且也不希望他看见
  • 接口隐藏,或者控制器隐藏
  • 添加默认值显示 代码示例
  • 在 Swagger 文档中给需要 Authorize 的接口添加 🔒

可用特性

  • ApiGroupAttribute 对控制器进行分组.便于将特有的功能分到一个组方便管理.
  • HiddenApiAttribute 隐藏控制器或者单个接口.
  • SwaggerIgnoreAttribute 忽略接口参数或者传入实体的属性 代码示例

如何使用?

// 添加 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.  net9.0 was computed.  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. 
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
4.25.109.111 0 18 hours ago
4.25.108.182 17 a day ago
4.25.108.160 18 2 days ago
4.25.1.1 87 8 days ago
3.24.1224.141 74 17 days ago
3.24.1216.116 85 25 days ago
3.24.1206.100 90 a month ago
3.24.1205.171 97 a month ago
3.24.1202.150 82 a month ago
3.24.1126.231 84 a month ago
3.24.1126.172 84 a month ago
3.24.1126.114 74 a month ago
3.24.1126.104 77 a month ago
3.24.1125.181 68 2 months ago
3.24.1125.104 84 2 months ago
3.24.1121.183 88 2 months ago
3.24.1120.183 88 2 months ago
3.24.1119.31 86 2 months ago
3.24.1115.143 71 2 months ago
3.24.1113.100 89 2 months ago
3.24.1112.125 96 2 months ago
3.24.1107.140 88 2 months ago
3.24.1107.54 86 2 months ago
3.24.1107.34 86 2 months ago
3.24.1105.111 90 2 months ago
3.24.1103.31 91 2 months ago
3.24.1103 89 2 months ago
3.24.1031.135 84 2 months ago
3.24.1031.112 78 2 months ago
3.24.1031.104 76 2 months ago
3.24.1029.142 101 2 months ago
3.24.1025.30 91 3 months ago
3.24.1022.142 77 3 months ago
3.24.1018.204 143 3 months ago
3.24.1018.175 135 3 months ago
3.24.1018.166 135 3 months ago
3.24.1018.93 140 3 months ago
3.24.1017.42 90 3 months ago
3.24.1016.161 88 3 months ago
3.24.1015.231 95 3 months ago
3.24.1015.14 90 3 months ago
3.24.1012.114 96 3 months ago
3.24.1009.115 96 3 months ago
3.24.1008.160 81 3 months ago
3.24.1008.133 88 3 months ago
3.24.1007.185 78 3 months ago
3.24.1003.33 92 3 months ago
3.24.1002.162 87 3 months ago
3.24.929.143 86 3 months ago
3.24.929.141 104 3 months ago
3.24.929.131 88 3 months ago
3.24.929.122 89 3 months ago
3.24.926.184 99 3 months ago
3.24.926.182 85 3 months ago
3.24.926.175 97 3 months ago
3.24.924.160 82 4 months ago
3.24.924.133 108 4 months ago
3.24.924.124 86 4 months ago
3.24.924.10 96 4 months ago
3.24.924.1 84 4 months ago
3.24.923.234 94 4 months ago
3.24.923.232 92 4 months ago
3.24.923.155 91 4 months ago
3.24.919.92 102 4 months ago
3.24.914.125 124 4 months ago
3.24.914.115 111 4 months ago
3.24.914.111 129 4 months ago
3.24.911.95 112 4 months ago
3.24.908.215 106 4 months ago
3.24.904.200 104 4 months ago
3.24.828.163 122 4 months ago
3.24.820.173 127 5 months ago
3.24.814.92 117 5 months ago
3.24.812.115 140 5 months ago
3.24.802.100 110 5 months ago
3.24.801.162 88 5 months ago
3.24.801.160 110 5 months ago
3.24.730.164 78 5 months ago
3.24.730.91 84 5 months ago
3.24.724.91 80 6 months ago
3.24.718.105 125 6 months ago
3.24.716.95 104 6 months ago
3.24.712.94 99 6 months ago
3.24.710.14 107 6 months ago
3.24.709.105 119 6 months ago
3.24.704.94 121 6 months ago
3.24.701.90 108 6 months ago
3.24.628.114 111 6 months ago
3.24.627.145 106 6 months ago
3.24.620.160 116 7 months ago
3.24.613.115 109 7 months ago
3.24.612.95 96 7 months ago
3.24.528.90 109 7 months ago
3.24.522.84 125 8 months ago
3.24.512.213 94 8 months ago
3.24.508.112 116 8 months ago
2.2024.428.71 112 8 months ago
2.2024.427.1128 122 8 months ago
2.2.72 133 9 months ago
2.2.71 126 9 months ago
2.2.8 100 8 months ago
2.2.6 112 9 months ago
2.2.5 132 9 months ago
2.2.4 119 10 months ago
2.2.3 133 10 months ago
2.2.2 157 10 months ago
2.2.1 135 10 months ago
2.2.0 137 10 months ago
2.1.9 150 2/21/2024
2.1.8 111 2/18/2024
2.1.7 125 2/16/2024
2.1.6 129 2/14/2024
2.1.5 122 2/14/2024
2.1.4 148 2/9/2024
2.1.3 146 2/8/2024
2.1.2 135 2/5/2024
2.1.1.2 205 12/26/2023
2.1.1.1 156 12/26/2023
2.1.1 156 12/25/2023
2.1.0 151 12/17/2023
2.0.11 227 12/6/2023
2.0.1 214 11/15/2023
2.0.0 166 11/14/2023
1.9.1 166 11/1/2023
1.9.0 167 10/19/2023
1.9.0-preview2 293 10/12/2023
1.9.0-preview1 149 10/12/2023
1.8.9 200 10/11/2023
1.8.8 173 10/11/2023
1.8.7-rc2 153 9/21/2023
1.8.7-rc1 155 9/12/2023
1.8.6 211 8/31/2023
1.8.5 828 8/25/2023
1.8.4 187 8/24/2023
1.8.3 211 8/23/2023
1.8.2 240 8/22/2023
1.8.1 212 8/18/2023
1.8.0 184 8/15/2023
1.7.9 212 8/11/2023
1.7.8 172 8/11/2023
1.7.7 200 8/10/2023
1.7.6 191 8/9/2023
1.7.5 238 8/9/2023
1.7.4 295 8/3/2023
1.7.3 213 8/1/2023
1.7.2 196 7/31/2023
1.7.1 171 7/27/2023
1.7.0 200 7/25/2023
1.6.9 224 7/25/2023
1.6.8 195 7/24/2023
1.6.7 218 7/20/2023
1.6.6 199 7/19/2023
1.6.5 175 7/19/2023
1.6.4 191 7/17/2023
1.6.3 180 7/17/2023
1.6.2 254 7/12/2023
1.6.1 261 6/30/2023
1.6.0 181 6/26/2023
1.5.9 218 6/22/2023
1.5.8 241 6/15/2023
1.5.7.1 225 6/14/2023
1.5.7 234 6/14/2023
1.5.6.2 236 6/7/2023
1.5.6.1 206 6/7/2023
1.5.6 206 6/7/2023
1.5.5.2 258 5/26/2023
1.5.5.1 222 5/26/2023
1.5.5 227 5/26/2023
1.5.4.4 199 5/25/2023
1.5.4.3 222 5/23/2023
1.5.4.2 292 5/17/2023
1.5.4.1 190 5/16/2023
1.5.4 283 5/11/2023
1.5.3 200 5/11/2023
1.5.2 230 5/10/2023
1.5.1 192 5/10/2023
1.5.0 240 5/6/2023
1.4.0 213 5/5/2023
1.3.9 264 4/23/2023