From c6734fb61ea9ed4ee88f26d2e4ac00d9e2fe6273 Mon Sep 17 00:00:00 2001 From: bicijinlian Date: Thu, 26 Nov 2020 23:33:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SwaggerStudy/Controllers/StudentController.cs | 6 ++++++ SwaggerStudy/StartupTest.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/SwaggerStudy/Controllers/StudentController.cs b/SwaggerStudy/Controllers/StudentController.cs index b3dbe6f..b03b948 100644 --- a/SwaggerStudy/Controllers/StudentController.cs +++ b/SwaggerStudy/Controllers/StudentController.cs @@ -12,6 +12,9 @@ using System.Threading.Tasks; namespace SwaggerStudy.Controllers { + /// + /// 学生操作接口 + /// [ApiController] [Route("api/[controller]/[action]")] public class StudentController : ControllerBase @@ -53,6 +56,9 @@ namespace SwaggerStudy.Controllers return await Task.FromResult(Ok(apiResult)); } + /// + /// 按学号获取学生 + /// [HttpGet] public IActionResult Get(int studentId) { diff --git a/SwaggerStudy/StartupTest.cs b/SwaggerStudy/StartupTest.cs index e362068..a153d33 100644 --- a/SwaggerStudy/StartupTest.cs +++ b/SwaggerStudy/StartupTest.cs @@ -75,7 +75,7 @@ namespace SwaggerStudy }); //包含xml注释 - var xmlCommentFiles = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, $"SwaggerStudy.*.xml", System.IO.SearchOption.TopDirectoryOnly); + var xmlCommentFiles = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, $"SwaggerStudy*.xml", System.IO.SearchOption.TopDirectoryOnly); foreach (var xmlFile in xmlCommentFiles) { setup.IncludeXmlComments(xmlFile, true);