From 87f516dbb2e9a10d0e6bb1cb15587c82c709e130 Mon Sep 17 00:00:00 2001
From: lg <999544862qq.com>
Date: 星期五, 16 八月 2024 08:34:33 +0800
Subject: [PATCH] 增加注释

---
 MESApplication/Startup.cs |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MESApplication/Startup.cs b/MESApplication/Startup.cs
index 17e9bf6..19d0a1d 100644
--- a/MESApplication/Startup.cs
+++ b/MESApplication/Startup.cs
@@ -4,6 +4,7 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Serialization;
 using Swashbuckle.AspNetCore.SwaggerUI;
+using System.Reflection;
 
 namespace MESApplication;
 
@@ -35,6 +36,9 @@
             c.SwaggerDoc("v1",
                 new OpenApiInfo
                     { Title = "MESApplication.Api", Version = "v1" });
+            var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
+            var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
+            c.IncludeXmlComments(xmlPath, true);
         });
 
         //閰嶇疆JSON.NET

--
Gitblit v1.9.3