From 3c9c7531c09a8f7cda8e71dff5d833861517b822 Mon Sep 17 00:00:00 2001 From: IGeekFan Date: Tue, 11 Aug 2020 17:05:52 +0800 Subject: [PATCH] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6d7d99..35e222f 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,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; }); }); ``` @@ -88,4 +89,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) \ No newline at end of file +![image](https://pic.downk.cc/item/5f2fa97814195aa594cd5cfc.jpg)