From 289a692d38966f16066f290609b599049e55fe9d Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期二, 05 八月 2025 09:33:45 +0800 Subject: [PATCH] pref:动态控制器渲染摘要 --- FlexJobApi.Core/Utils/SwaggerUtils/CustomOperationIdFilter.cs | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/FlexJobApi.Core/Utils/SwaggerUtils/CustomOperationIdFilter.cs b/FlexJobApi.Core/Utils/SwaggerUtils/CustomOperationIdFilter.cs index e199858..cc1a599 100644 --- a/FlexJobApi.Core/Utils/SwaggerUtils/CustomOperationIdFilter.cs +++ b/FlexJobApi.Core/Utils/SwaggerUtils/CustomOperationIdFilter.cs @@ -18,12 +18,15 @@ if (context.ApiDescription.ActionDescriptor is not ControllerActionDescriptor actionDescriptor) return; + var xmlDoc = XmlDocUtils.GetXmlDocAsync().Result; + // 鑷畾涔� OperationId 瑙勫垯锛氫緥濡傗�滄帶鍒跺櫒鍚峗鍔ㄤ綔鍚嶁�� var controllerName = actionDescriptor.ControllerName; var actionName = actionDescriptor.ActionName; // 璁剧疆鏈�缁堢殑 OperationId operation.OperationId = $"{actionName}"; + operation.Summary = actionDescriptor.MethodInfo.GetParameters()[0].ParameterType.GetXmlDocMemberAsync(xmlDoc).Result?.Summary; var returnType = context.MethodInfo.ReturnType; -- Gitblit v1.9.1