MicroCloud.Swagger
8.0.3.1
dotnet add package MicroCloud.Swagger --version 8.0.3.1
NuGet\Install-Package MicroCloud.Swagger -Version 8.0.3.1
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="MicroCloud.Swagger" Version="8.0.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MicroCloud.Swagger" Version="8.0.3.1" />
<PackageReference Include="MicroCloud.Swagger" />
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 MicroCloud.Swagger --version 8.0.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroCloud.Swagger, 8.0.3.1"
#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 MicroCloud.Swagger@8.0.3.1
#: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=MicroCloud.Swagger&version=8.0.3.1
#tool nuget:?package=MicroCloud.Swagger&version=8.0.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MicroCloud Swagger API 文档生成组件
说明
集成 Swagger API 文档生成组件,方便前后端分离的开发模式中前后端开发人员的数据接口对接工作。基于Swagger的工作原理,API的输入输出都需使用强类型的数据类型,Swagger才能发挥更好的作用,而MicroCloud框架通过AutoMapper的ProjectTo对业务实体到输出DTOIOutputDto提供了自动映射功能,能有效减轻后端开发中数据对象属性映射的工作量。
用法
可按照如下配置方式使用:
- 通过nuget引用
MicroCloud.Swagger程序集
Install-Package MicroCloud.Swagger
- 在
appsettings.json中 的MicroCloud节点下添加如下配置节点
{
"Swagger": {
"UI": "knife4j", //界面样式:knife4j、swagger(默认)。
"IsHideSchemas": true, //隐藏架构
"MiniProfiler": true, //启用轻量级工具分析
// 注释文档
"XmlPattern": "microcloud*.xml",
//分组集合
"Groups": [
{
"Name": "api", //名称
"Title": "框架API", //标题
"Description": "框架API", //描述
"Url": "", //Url
"Visible": true //是否可见
},
{
"Name": "buss", //名称
"Title": "业务API", //标题
"Description": "业务API", //描述
"Url": "/swagger/buss/swagger.json", //Url
"Visible": false //是否可见
}
],
"Enabled": true //是否启用
}
}
- 要禁用Swagger,可以设置
Enabled: false
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. 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.
-
net8.0
- MicroCloud.MiniProfiler (>= 8.0.3.1)
- Swashbuckle.AspNetCore (>= 6.7.3)
- Swashbuckle.AspNetCore.Newtonsoft (>= 6.7.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 |
|---|---|---|
| 8.0.3.1 | 207 | 9/9/2024 |
| 8.0.2.9 | 196 | 9/5/2024 |
| 8.0.2.8 | 188 | 8/31/2024 |
| 8.0.2.7 | 183 | 8/31/2024 |
| 8.0.2.6 | 209 | 8/21/2024 |
| 8.0.2.5 | 213 | 8/21/2024 |
| 8.0.2.4 | 196 | 8/12/2024 |
| 8.0.2.3 | 193 | 8/8/2024 |
| 8.0.2.2 | 197 | 7/14/2024 |
| 8.0.2.1 | 176 | 6/7/2024 |
| 8.0.1.9 | 182 | 6/6/2024 |
| 8.0.1.8 | 180 | 6/6/2024 |
| 8.0.1.7 | 193 | 5/15/2024 |
| 8.0.1.6 | 174 | 5/15/2024 |
| 8.0.1.5 | 196 | 5/15/2024 |
| 8.0.1.4 | 164 | 5/14/2024 |
| 8.0.1.3 | 186 | 5/10/2024 |
| 8.0.1.2 | 216 | 5/8/2024 |
| 8.0.1.1 | 193 | 5/7/2024 |
| 8.0.0.9 | 178 | 5/1/2024 |
| 8.0.0.8 | 197 | 5/1/2024 |
| 8.0.0.7 | 214 | 4/30/2024 |
| 8.0.0.5 | 194 | 4/19/2024 |
| 8.0.0.4 | 208 | 4/18/2024 |
| 8.0.0.3 | 211 | 4/15/2024 |
| 8.0.0.2 | 217 | 4/12/2024 |
| 8.0.0.1 | 202 | 4/12/2024 |
| 7.2.0.8 | 219 | 4/12/2024 |
| 7.2.0.7 | 193 | 4/12/2024 |
| 7.2.0.6 | 206 | 4/12/2024 |
| 7.2.0.5 | 201 | 4/12/2024 |
| 7.2.0.4 | 222 | 4/11/2024 |
| 7.2.0.2 | 208 | 4/7/2024 |
| 7.2.0.1 | 370 | 10/26/2023 |
| 7.1.2.9 | 204 | 11/7/2023 |
| 7.1.2.8 | 218 | 10/19/2023 |
| 7.1.2.7 | 202 | 10/19/2023 |
| 7.1.2.6 | 204 | 10/18/2023 |
| 7.1.2.4 | 225 | 9/13/2023 |
| 7.1.2.3 | 211 | 9/13/2023 |
| 7.1.2.2 | 202 | 9/12/2023 |
| 7.1.2.1 | 199 | 9/4/2023 |
| 7.1.1.9 | 240 | 8/31/2023 |
| 7.1.1.6 | 227 | 8/29/2023 |
| 7.1.1.5 | 214 | 8/25/2023 |
| 7.1.1.4 | 210 | 8/25/2023 |
| 7.1.1.3 | 241 | 8/25/2023 |
| 7.1.1.2 | 235 | 8/24/2023 |
| 7.1.1.1 | 226 | 8/24/2023 |
| 7.0.3.1 | 236 | 8/24/2023 |
| 7.0.2.7 | 233 | 5/12/2023 |
| 7.0.2.6 | 287 | 5/11/2023 |
| 7.0.1.7 | 261 | 5/9/2023 |
| 7.0.1.6 | 254 | 5/9/2023 |
| 7.0.1.4 | 292 | 4/24/2023 |
| 7.0.1.3 | 289 | 4/19/2023 |
| 7.0.1.2 | 299 | 4/19/2023 |
| 7.0.0.9 | 303 | 4/18/2023 |
| 7.0.0.8 | 303 | 4/17/2023 |
| 7.0.0.7 | 295 | 4/12/2023 |
| 7.0.0.6 | 295 | 4/8/2023 |
| 7.0.0.5 | 304 | 4/7/2023 |
| 7.0.0.4 | 312 | 4/7/2023 |
| 7.0.0.3 | 287 | 4/7/2023 |