mirror of
https://github.com/nsnail/IGeekFan.AspNetCore.Knife4jUI.git
synced 2025-12-27 09:05:49 +08:00
add 直接替换index.html,不使用新的类库。
This commit is contained in:
25
README.md
25
README.md
@@ -1,5 +1,9 @@
|
||||
# IGeekFan.AspNetCore.Knife4jUI
|
||||
一个支持.NET Core3.0,.NET Standard2.0的swagger ui 库:**knife4j UI**。
|
||||
|
||||
一个swagger ui 库:**[knife4j UI](https://gitee.com/xiaoym/knife4j)**,支持 .NET Core3.0+或.NET Standard2.0。
|
||||
|
||||
|
||||
[](https://www.nuget.org/packages/IGeekFan.AspNetCore.Knife4jUI) [](https://www.nuget.org/stats/packages/IGeekFan.AspNetCore.Knife4jUI?groupby=Version) [](https://raw.githubusercontent.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/master/LICENSE.txt)
|
||||
|
||||
## 相关依赖项
|
||||
### [knife4j](https://gitee.com/xiaoym/knife4j)
|
||||
@@ -12,9 +16,9 @@
|
||||
- [Basic](https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/blob/master/test/Basic)
|
||||
- [Knife4jUIDemo](https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/blob/master/test/Knife4jUIDemo)
|
||||
|
||||
## 快速开始
|
||||
## 📚 快速开始
|
||||
|
||||
### 安装包
|
||||
### 🚀安装包
|
||||
|
||||
1.Install the standard Nuget package into your ASP.NET Core application.
|
||||
|
||||
@@ -31,10 +35,9 @@ using Microsoft.OpenApi.Models;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
using IGeekFan.AspNetCore.Knife4jUI;
|
||||
```
|
||||
### ConfigureServices
|
||||
### 🚁 ConfigureServices
|
||||
|
||||
CustomOperationIds
|
||||
AddServer,必须的。
|
||||
3.服务配置,CustomOperationIds和AddServer是必须的。
|
||||
```
|
||||
services.AddSwaggerGen(c =>
|
||||
{
|
||||
@@ -51,8 +54,8 @@ AddServer,必须的。
|
||||
});
|
||||
```
|
||||
|
||||
### Configure
|
||||
|
||||
### 💪 Configure
|
||||
4. 中间件配置
|
||||
```
|
||||
app.UseSwagger();
|
||||
|
||||
@@ -70,7 +73,7 @@ app.UseEndpoints(endpoints =>
|
||||
```
|
||||
|
||||
|
||||
### 效果图
|
||||
### 🔎 效果图
|
||||
运行项目,打开 https://localhost:5001/index.html#/home
|
||||
|
||||

|
||||
@@ -83,4 +86,6 @@ app.UseEndpoints(endpoints =>
|
||||
|
||||
### 更多项目
|
||||
|
||||
- [https://api.igeekfan.cn/swagger/index.html](https://api.igeekfan.cn/swagger/index.html)
|
||||
- [https://api.igeekfan.cn/swagger/index.html](https://api.igeekfan.cn/swagger/index.html)
|
||||
- [https://github.com/luoyunchong/lin-cms-dotnetcore](https://github.com/luoyunchong/lin-cms-dotnetcore)
|
||||

|
||||
Reference in New Issue
Block a user