From f89c452983b419b7ab5dc617d101138c48e7c0b4 Mon Sep 17 00:00:00 2001 From: bicijinlian Date: Thu, 26 Nov 2020 23:26:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E8=88=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SwaggerStudy/.config/dotnet-tools.json | 12 ++++++++++++ SwaggerStudy/StartupTest.cs | 12 ++++++------ SwaggerStudy/SwaggerStudy.csproj | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 SwaggerStudy/.config/dotnet-tools.json diff --git a/SwaggerStudy/.config/dotnet-tools.json b/SwaggerStudy/.config/dotnet-tools.json new file mode 100644 index 0000000..c735fef --- /dev/null +++ b/SwaggerStudy/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "5.0.0", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/SwaggerStudy/StartupTest.cs b/SwaggerStudy/StartupTest.cs index 4e7ed33..e362068 100644 --- a/SwaggerStudy/StartupTest.cs +++ b/SwaggerStudy/StartupTest.cs @@ -75,12 +75,12 @@ namespace SwaggerStudy }); //包含xml注释 - //var xmlCommentFiles = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, $"SwaggerStudy.*.xml", System.IO.SearchOption.TopDirectoryOnly); - //foreach (var xmlFile in xmlCommentFiles) - //{ - // setup.IncludeXmlComments(xmlFile, true); - //} - + var xmlCommentFiles = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, $"SwaggerStudy.*.xml", System.IO.SearchOption.TopDirectoryOnly); + foreach (var xmlFile in xmlCommentFiles) + { + setup.IncludeXmlComments(xmlFile, true); + } + }); //配置SwaggerGen diff --git a/SwaggerStudy/SwaggerStudy.csproj b/SwaggerStudy/SwaggerStudy.csproj index b2ceaae..819ef67 100644 --- a/SwaggerStudy/SwaggerStudy.csproj +++ b/SwaggerStudy/SwaggerStudy.csproj @@ -4,6 +4,7 @@ net5.0 true $(NoWarn);1591 + 2f9ec575-5227-4ce1-b564-47ea6459c71b