This commit is contained in:
luoyunchong 2020-08-11 18:37:03 +08:00
commit a827c8965e

View File

@ -50,7 +50,8 @@ using IGeekFan.AspNetCore.Knife4jUI;
});
c.CustomOperationIds(apiDesc =>
{
return apiDesc.TryGetMethodInfo(out MethodInfo methodInfo) ? methodInfo.Name : null;
var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor;
return controllerAction.ControllerName+"-"+controllerAction.ActionName;
});
});
```
@ -89,4 +90,4 @@ app.UseEndpoints(endpoints =>
- [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)
![image](https://pic.downk.cc/item/5f2fa97814195aa594cd5cfc.jpg)
![image](https://pic.downk.cc/item/5f2fa97814195aa594cd5cfc.jpg)