From 4a198f10563960880d1e89cc6dce6e245f52924a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=A7=E5=B8=88=E5=85=84=E6=B3=95=E5=8F=B7=E9=9A=8F?=
=?UTF-8?q?=E7=BC=98?= <18862253202@qq.com>
Date: Wed, 24 Sep 2025 12:02:13 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E4=BD=BF=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
电子展板/Models/MyConfig.cs | 51 ++++-----
电子展板/Models/RetValue.cs | 17 +--
电子展板/Utility/ContentTypeUtils.cs | 16 ---
.../Swagger/SwaggerClassCommentAttribute.cs | 18 ---
.../Swagger/SwaggerCommentAttribute.cs | 39 -------
.../Utility/Swagger/SwaggerModelDataUtils.cs | 41 -------
电子展板/Utility/Swagger/SwaggerModule.cs | 56 ----------
.../WebModule/ApplicationBootstrapper.cs | 3 +
电子展板/WebModule/HomeMetadataModule.cs | 104 ------------------
电子展板/WebModule/HomeModule.cs | 79 +++++++++----
.../MyConfigModelDataProvider.cs | 24 ----
.../ModelMetadata/RetValueDataProvider.cs | 19 ----
电子展板/电子展板.csproj | 11 +-
13 files changed, 103 insertions(+), 375 deletions(-)
delete mode 100644 电子展板/Utility/ContentTypeUtils.cs
delete mode 100644 电子展板/Utility/Swagger/SwaggerClassCommentAttribute.cs
delete mode 100644 电子展板/Utility/Swagger/SwaggerCommentAttribute.cs
delete mode 100644 电子展板/Utility/Swagger/SwaggerModelDataUtils.cs
delete mode 100644 电子展板/Utility/Swagger/SwaggerModule.cs
delete mode 100644 电子展板/WebModule/HomeMetadataModule.cs
delete mode 100644 电子展板/WebModule/ModelMetadata/MyConfigModelDataProvider.cs
delete mode 100644 电子展板/WebModule/ModelMetadata/RetValueDataProvider.cs
diff --git a/电子展板/Models/MyConfig.cs b/电子展板/Models/MyConfig.cs
index 9238486..f522876 100644
--- a/电子展板/Models/MyConfig.cs
+++ b/电子展板/Models/MyConfig.cs
@@ -1,80 +1,80 @@
-using System;
+using Nancy.Swagger.Annotations.Attributes;
+using System;
using System.Linq;
using System.Text;
using 电子展板.Base;
-using 电子展板.Utility.Swagger;
namespace 电子展板.Models
{
///
/// 配置类
///
- [SwaggerClassComment("配置项")]
+ [Model("配置项")]
public class MyConfig : ModelBase
{
///
/// 时间
///
[Comment("时间")]
- [SwaggerComment("时间", true)]
+ [ModelProperty(Description = "时间", Required = true)]
public string Time { get; set; }
///
/// 时间字体大小
///
[Comment("时间字体大小")]
- [SwaggerComment("时间字体大小", true, 15, 60)]
+ [ModelProperty(Description = "时间字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int TimeSize { get; set; }
///
/// 负责人
///
[Comment("负责人")]
- [SwaggerComment("负责人", true)]
+ [ModelProperty(Description = "负责人", Required = true)]
public string Charger { get; set; }
///
/// 负责人字体大小
///
- [Comment("负责人字体大小")]
- [SwaggerComment("负责人字体大小", true, 15, 60)]
+ [Comment("负责人字体大小")]
+ [ModelProperty(Description = "负责人字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int ChargerSize { get; set; }
///
/// 风险等级
///
[Comment("风险等级")]
- [SwaggerComment("风险等级", true)]
+ [ModelProperty(Description = "风险等级", Required = true)]
public string RiskLevel { get; set; }
///
/// 风险等级字体大小
///
[Comment("风险等级字体大小")]
- [SwaggerComment("风险等级字体大小", true, 15, 60)]
+ [ModelProperty(Description = "风险等级字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int RiskLevelSize { get; set; }
///
/// 工作内容
///
[Comment("工作内容")]
- [SwaggerComment("工作内容", true)]
+ [ModelProperty(Description = "工作内容", Required = true)]
public string Content { get; set; }
///
/// 工作内容字体大小
///
[Comment("工作内容字体大小")]
- [SwaggerComment("工作内容字体大小", true, 15, 60)]
+ [ModelProperty(Description = "工作内容字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int ContentSize { get; set; }
///
/// 危险点
///
[Comment("危险点")]
- [SwaggerComment("危险点", true)]
+ [ModelProperty(Description = "危险点", Required = true)]
public string DangerPoint { get; set; }
///
/// 危险点
///
[Comment("危险点字体大小")]
- [SwaggerComment("危险点字体大小", true, 15, 60)]
+ [ModelProperty(Description = "危险点字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int DangerPointSize { get; set; }
@@ -82,40 +82,41 @@ namespace 电子展板.Models
/// 重点措施
///
[Comment("重点措施")]
- [SwaggerComment("重点措施", true)]
+ [ModelProperty(Description = "重点措施", Required = true)]
public string Measures { get; set; }
[Comment("重点措施字体大小")]
+ [ModelProperty(Description = "重点措施字体大小", Required = true)]
public int MeasuresSize { get; set; }
[Comment("党员1图片路径")]
- [SwaggerComment("党员1图片路径", true)]
+ [ModelProperty(Description = "党员1图片路径", Required = true)]
public string CPCMember1Path { get; set; }
[Comment("党员1姓名")]
- [SwaggerComment("党员1姓名", true)]
+ [ModelProperty(Description = "党员1姓名", Required = true)]
public string CPCMember1Name { get; set; }
[Comment("党员2图片路径")]
- [SwaggerComment("党员2图片路径", true)]
+ [ModelProperty(Description = "党员2图片路径", Required = true)]
public string CPCMember2Path { get; set; }
[Comment("党员2姓名")]
- [SwaggerComment("党员2姓名", true)]
+ [ModelProperty(Description = "党员2姓名", Required = true)]
public string CPCMember2Name { get; set; }
[Comment("党员3图片路径")]
- [SwaggerComment("党员3图片路径", true)]
+ [ModelProperty(Description = "党员3图片路径", Required = true)]
public string CPCMember3Path { get; set; }
-
+
[Comment("党员3姓名")]
- [SwaggerComment("党员3姓名", true)]
+ [ModelProperty(Description = "党员3姓名", Required = true)]
public string CPCMember3Name { get; set; }
[Comment("党员4图片路径")]
- [SwaggerComment("党员4图片路径", true)]
+ [ModelProperty(Description = "党员4图片路径", Required = true)]
public string CPCMember4Path { get; set; }
[Comment("党员4姓名")]
- [SwaggerComment("党员4姓名", true)]
+ [ModelProperty(Description = "党员4姓名", Required = true)]
public string CPCMember4Name { get; set; }
[Comment("党员字体大小")]
- [SwaggerComment("党员字体大小", true, 15, 60)]
+ [ModelProperty(Description = "党员字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int CPCMemberSize { get; set; }
///
/// 转换成JSON字符串
diff --git a/电子展板/Models/RetValue.cs b/电子展板/Models/RetValue.cs
index 5416a57..41a59e2 100644
--- a/电子展板/Models/RetValue.cs
+++ b/电子展板/Models/RetValue.cs
@@ -1,20 +1,21 @@
-using System;
+using Nancy.Swagger.Annotations.Attributes;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using 电子展板.Utility.Swagger;
namespace 电子展板.Models
{
- [SwaggerClassComment("返回数据")]
- public class RetValue
+ [Model("返回数据")]
+ public class RetValue
{
- [SwaggerComment("返回状态")]
+ [ModelProperty("返回状态")]
public int state { get; set; }
- [SwaggerComment("返回消息")]
+ [ModelProperty("返回消息")]
public string message { get; set; }
- [SwaggerComment("返回数据")]
- public object data { get; set; }
+
+ [ModelProperty("返回数据")]
+ public T data { get; set; }
}
}
diff --git a/电子展板/Utility/ContentTypeUtils.cs b/电子展板/Utility/ContentTypeUtils.cs
deleted file mode 100644
index c57c2f5..0000000
--- a/电子展板/Utility/ContentTypeUtils.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace 电子展板.Utility
-{
- public class ContentTypeUtils
- {
- public static string GetContentType(string fileName)
- {
- return System.Web.MimeMapping.GetMimeMapping(fileName);
- }
- }
-}
diff --git a/电子展板/Utility/Swagger/SwaggerClassCommentAttribute.cs b/电子展板/Utility/Swagger/SwaggerClassCommentAttribute.cs
deleted file mode 100644
index be05019..0000000
--- a/电子展板/Utility/Swagger/SwaggerClassCommentAttribute.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace 电子展板.Utility.Swagger
-{
- [AttributeUsage(AttributeTargets.Class)]
- public class SwaggerClassCommentAttribute : Attribute
- {
- public string Comment { get; set; }
- public SwaggerClassCommentAttribute(string comment)
- {
- Comment = comment;
- }
- }
-}
diff --git a/电子展板/Utility/Swagger/SwaggerCommentAttribute.cs b/电子展板/Utility/Swagger/SwaggerCommentAttribute.cs
deleted file mode 100644
index 66dade2..0000000
--- a/电子展板/Utility/Swagger/SwaggerCommentAttribute.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace 电子展板.Utility.Swagger
-{
- [AttributeUsage(AttributeTargets.Property)]
- public class SwaggerCommentAttribute : Attribute
- {
- public string Comment { get; set; }
- public bool? IsRequired { get; set; }
-
- public long? Min { get; set; }
- public long? Max { get; set; }
- public SwaggerCommentAttribute()
- {
- Comment = "";
- }
- public SwaggerCommentAttribute(string comment)
- {
- Comment = comment;
- }
- public SwaggerCommentAttribute(string comment, bool isRequired)
- {
- Comment = comment;
- IsRequired = isRequired;
- }
- public SwaggerCommentAttribute(string comment, bool isRequired, long min, long max)
- {
- Comment = comment;
- IsRequired = isRequired;
- Min = min;
- Max = max;
- }
-
- }
-}
diff --git a/电子展板/Utility/Swagger/SwaggerModelDataUtils.cs b/电子展板/Utility/Swagger/SwaggerModelDataUtils.cs
deleted file mode 100644
index 49c7016..0000000
--- a/电子展板/Utility/Swagger/SwaggerModelDataUtils.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using Nancy.Swagger;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace 电子展板.Utility.Swagger
-{
- public static class SwaggerModelDataUtils
- {
- public static SwaggerModelData GetModelData()
- {
- return SwaggerModelData.ForType(with =>
- {
- Type type = typeof(T);
- SwaggerClassCommentAttribute classComment = type.GetCustomAttribute();
- with.Description(classComment != null ? classComment.Comment : type.Name);
- PropertyInfo[] propertyInfos = typeof(T).GetProperties();
- foreach (PropertyInfo propertyInfo in propertyInfos)
- {
- SwaggerModelPropertyData ss = with.Data.Properties.Where(x => x.Name == propertyInfo.Name).FirstOrDefault();
- SwaggerCommentAttribute attribute = propertyInfo.GetCustomAttribute();
- if (attribute == null)
- {
- continue;
- }
- if (!string.IsNullOrEmpty(attribute.Comment))
- ss.Description = attribute.Comment;
- if (attribute.IsRequired != null)
- ss.Required = attribute.IsRequired.Value;
- if (attribute.Min != null)
- ss.Minimum = attribute.Min.Value;
- if (attribute.Max != null)
- ss.Maximum = attribute.Max.Value;
- }
- });
- }
- }
-}
diff --git a/电子展板/Utility/Swagger/SwaggerModule.cs b/电子展板/Utility/Swagger/SwaggerModule.cs
deleted file mode 100644
index 204a5cd..0000000
--- a/电子展板/Utility/Swagger/SwaggerModule.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Nancy;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace 电子展板.Utility.Swagger
-{
- public class SwaggerModule : NancyModule
- {
- public SwaggerModule()
- {
- //全局静态资源
- Get("/swagger", RedirectToIndex);
- Get("/swagger/index.html", Index);
- Get("/swagger/{name*}", StaticResource);
- }
-
- private object RedirectToIndex(dynamic dynamic)
- {
- return Response.AsRedirect("/swagger/index.html");
- }
-
- private object Index(dynamic dynamic)
- {
- var url = $"{Request.Url.BasePath}/api-docs";
- string packUri = $"pack://application:,,,/Assets/SwaggerUI/index.html";
- string contentType = System.Web.MimeMapping.GetMimeMapping(packUri);
- byte[] bytes = null;
- using (var stream = System.Windows.Application.GetResourceStream(new Uri(packUri, UriKind.RelativeOrAbsolute)).Stream)
- {
- bytes = new byte[stream.Length];
- stream.Read(bytes, 0, bytes.Length);
- }
- string html = Encoding.UTF8.GetString(bytes);
- html = html.Replace("@url", url);
- return Response.AsText(html, contentType);
- }
-
- private object StaticResource(dynamic dynamic)
- {
- string name = dynamic.name;
- return Resouce(name);
- }
-
- private object Resouce(string resourcePath)
- {
- if (resourcePath == "")
- resourcePath = "index.html";
- string packUri = $"pack://application:,,,/Assets/SwaggerUI/{resourcePath}";
- string contentType = System.Web.MimeMapping.GetMimeMapping(packUri);
- return Response.FromStream(System.Windows.Application.GetResourceStream(new Uri(packUri, UriKind.RelativeOrAbsolute)).Stream, contentType);
- }
- }
-}
diff --git a/电子展板/WebModule/ApplicationBootstrapper.cs b/电子展板/WebModule/ApplicationBootstrapper.cs
index 3e0d222..e9384a4 100644
--- a/电子展板/WebModule/ApplicationBootstrapper.cs
+++ b/电子展板/WebModule/ApplicationBootstrapper.cs
@@ -1,6 +1,7 @@
using Nancy;
using Nancy.Bootstrapper;
using Nancy.Conventions;
+using Nancy.Swagger.Annotations;
using Nancy.Swagger.Services;
using Nancy.TinyIoc;
using Swagger.ObjectModel;
@@ -18,6 +19,8 @@ namespace 电子展板.WebModule
Url = "https://www.cnblogs.com/zjwno1"
}, "http://www.cnblogs.com/zjwno1");
base.ApplicationStartup(container, pipelines);
+ //仅显示有特性的接口
+ SwaggerAnnotationsConfig.ShowOnlyAnnotatedRoutes = true;
}
protected override void ConfigureConventions(NancyConventions nancyConventions)
diff --git a/电子展板/WebModule/HomeMetadataModule.cs b/电子展板/WebModule/HomeMetadataModule.cs
deleted file mode 100644
index 839c82e..0000000
--- a/电子展板/WebModule/HomeMetadataModule.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using Nancy.Metadata.Modules;
-using Nancy.Swagger;
-using Swagger.ObjectModel;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using 电子展板.Models;
-using 电子展板.Utility.Core;
-
-namespace 电子展板.WebModule
-{
- public class HomeMetadataModule : MetadataModule
- {
- public HomeMetadataModule(ISwaggerModelCatalog modelCatalog)
- {
- //添加模型
- modelCatalog.AddModels(typeof(MyConfig));
- Describe["getConfig"] = description => description.AsSwagger(
- with => with.Operation(
- op =>
- {
- //设置操作id
- op.OperationId("getConfig");
- //设置tag
- op.Tag("getConfig");
- //备注
- op.Summary("获得当前配置");
- //参数配置
- //op.BodyParameter(p =>
- // p.Description("配置项")
- // .Name("Config")
- // .Schema()
- //);
- //返回值配置
- op.Response(r =>
- r.Description("返回数据")
- //.Example("application/json", JsonHelper.ToJson(GlobalVariable.Config))
- .Schema()
- );
- }
- )
- );
-
- Describe["uploadImage"] = description => description.AsSwagger(
- with => with.Operation(
- op =>
- {
- //设置操作id
- op.OperationId("uploadImage");
- //设置tag
- op.Tag("uploadImage");
- //备注
- op.Summary("上传照片");
- //文件上传
- op.ConsumeMimeType("multipart/form-data");
- //参数配置
- op.Parameter(p =>
- p.In(ParameterIn.Form)
- .Name("file")//参数名
- .Type("file")//文件类型
- .Description("上传文件")
- .IsRequired()
- );
- //返回值配置
- op.Response(r =>
- r.Description("返回数据")
- .Example("application/json", new RetValue { state = 1, message = "上传成功", data = "/upload/123.png" }.ToJson())
- .Schema()
- );
- }
- )
- );
-
- Describe["save"] = description => description.AsSwagger(
- with => with.Operation(
- op =>
- {
- //设置操作id
- op.OperationId("save");
- //设置tag
- op.Tag("save");
- //备注
- op.Summary("保存配置");
- //参数配置
- op.BodyParameter(p =>
- p.Description("配置项")
- .Name("Config")
- .Schema()
- );
- //返回值配置
- op.Response(r =>
- r.Description("返回数据")
- .Example("application/json", new RetValue { state = 1, message = "保存成功" }.ToJson())
- .Schema()
- );
- }
- )
- );
- }
- }
-
-}
diff --git a/电子展板/WebModule/HomeModule.cs b/电子展板/WebModule/HomeModule.cs
index 55d6b76..c8f82bd 100644
--- a/电子展板/WebModule/HomeModule.cs
+++ b/电子展板/WebModule/HomeModule.cs
@@ -1,5 +1,8 @@
using Nancy;
using Nancy.ModelBinding;
+using Nancy.Swagger;
+using Nancy.Swagger.Annotations.Attributes;
+using Swagger.ObjectModel;
using System;
using System.Collections.Generic;
using System.IO;
@@ -19,8 +22,14 @@ namespace 电子展板.WebModule
{
public class HomeModule : NancyModule
{
- public HomeModule()
+ public HomeModule(ISwaggerModelCatalog modelCatalog)
{
+
+ //涉及到哪些Model
+ modelCatalog.AddModel();
+ modelCatalog.AddModel>();
+
+
//默认页面
Get("", Index);
Get("/", Index);
@@ -33,26 +42,51 @@ namespace 电子展板.WebModule
//获得上传的文件
Get("/upload/{id}", GetUploadFiles);
//上传图片
- Post("/uploadImage", UploadImage, null, "uploadImage");
+ Post("/uploadImage", dynamic =>
+ {
+ IEnumerable files = Request.Files;
+ if (files == null || files.Count() == 0)
+ return UploadImage(null);
+ return UploadImage(files.FirstOrDefault());
+ }, null, "uploadImage");
//保存配置
Post("/save", SaveConfig, null, "save");
}
- //默认页面
+
+
+ ///
+ /// 默认页面
+ ///
+ ///
+ ///
private object Index(dynamic dynamic)
{
return Resouce("Views/Index.html");
}
- //全局静态资源
+
+
+ ///
+ /// 全局静态资源
+ ///
+ ///
+ ///
private object StaticResource(dynamic dynamic)
{
string name = dynamic.name;
return Resouce(name);
}
+
+
///
/// 获得配置
///
///
///
+ [Route("getConfig")]//Name
+ [Route(HttpMethod.Get, "/getConfig")]//Method And Path
+ [Route(Summary = "获得配置数据")]
+ [SwaggerResponse(HttpStatusCode.OK, typeof(MyConfig))]
+ [Route(Tags = new[] { "获得配置数据" })]
private object GetConfig(dynamic dynamic)
{
//保留JSON KEY首字母大写,这里就不用 Response.AsJson();
@@ -70,7 +104,7 @@ namespace 电子展板.WebModule
private object GetUploadFiles(dynamic dynamic)
{
string id = dynamic.id;
- string contentType = System.Web.MimeMapping.GetMimeMapping(id);
+ string contentType = MimeTypes.GetMimeType(id);
return Response.AsFile(MyEnvironment.Root("/Upload/" + id), contentType);
}
@@ -79,29 +113,36 @@ namespace 电子展板.WebModule
///
///
///
- private object UploadImage(dynamic dynamic)
+ [Route("uploadImage")]//Name
+ [Route(HttpMethod.Post, "/uploadImage")]//Method And Path
+ [Route(Summary = "上传图片")]
+ [SwaggerResponse(HttpStatusCode.OK, typeof(RetValue))]
+ [Route(Tags = new[] { "上传图片" })]
+ private object UploadImage([RouteParam(ParamIn = ParameterIn.Form, Name = "file", Description = "图片文件", ParamType = typeof(SwaggerFile), Required = true)] HttpFile file)
{
string uploadPath = MyEnvironment.Root("/Upload/");
if (!Directory.Exists(uploadPath))
{
Directory.CreateDirectory(uploadPath);
}
- List filePathList = new List();
- foreach (var file in Request.Files)
+
+ string ext = Path.GetExtension(file.Name);
+ string fileName = UUID.StrSnowId + ext;
+ var filePath = uploadPath + fileName;
+ using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
{
- string ext = Path.GetExtension(file.Name);
- string fileName = UUID.StrSnowId + ext;
- var filePath = uploadPath + fileName;
- using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
- {
- file.Value.CopyTo(fileStream);
- }
- filePathList.Add($"/Upload/{fileName}");
+ file.Value.CopyTo(fileStream);
}
- RetValue result = new RetValue { state = 1, message = "上传成功", data = filePathList.GetStrArray() };
+ RetValue result = new RetValue { state = 1, message = "上传成功", data = $"/upload/{fileName}" };
return Response.AsJson(result);
}
+
+ [Route("save")]//Name
+ [Route(HttpMethod.Post, "/save")]//Method And Path
+ [Route(Summary = "保存配置")]
+ [SwaggerResponse(HttpStatusCode.OK, typeof(RetValue))]
+ [Route(Tags = new[] { "保存配置" })]
private object SaveConfig(dynamic dynamic)
{
MyConfig config = this.Bind();
@@ -119,13 +160,13 @@ namespace 电子展板.WebModule
GlobalVariable.SaveConfig();
//保存并修改界面
EventBus.Instance.Publish("save", "");
- RetValue result = new RetValue { state = 1, message = "保存成功" };
+ RetValue result = new RetValue { state = 1, message = "保存成功" };
return Response.AsJson(result);
}
private object Resouce(string resourcePath)
{
string packUri = $"pack://application:,,,/Assets/{resourcePath}";
- string contentType = System.Web.MimeMapping.GetMimeMapping(packUri);
+ string contentType = MimeTypes.GetMimeType(packUri);
return Response.FromStream(System.Windows.Application.GetResourceStream(new Uri(packUri, UriKind.RelativeOrAbsolute)).Stream, contentType);
}
}
diff --git a/电子展板/WebModule/ModelMetadata/MyConfigModelDataProvider.cs b/电子展板/WebModule/ModelMetadata/MyConfigModelDataProvider.cs
deleted file mode 100644
index 92c8667..0000000
--- a/电子展板/WebModule/ModelMetadata/MyConfigModelDataProvider.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Nancy.Swagger;
-using Nancy.Swagger.Services;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using 电子展板.Models;
-using 电子展板.Utility.Swagger;
-
-namespace 电子展板.WebModule.ModelMetadata
-{
- public class MyConfigModelDataProvider : ISwaggerModelDataProvider
- {
- ///
- /// 使用自定义特性注解完成配置
- ///
- ///
- public SwaggerModelData GetModelData()
- {
- return SwaggerModelDataUtils.GetModelData();
- }
- }
-}
diff --git a/电子展板/WebModule/ModelMetadata/RetValueDataProvider.cs b/电子展板/WebModule/ModelMetadata/RetValueDataProvider.cs
deleted file mode 100644
index a7d33ab..0000000
--- a/电子展板/WebModule/ModelMetadata/RetValueDataProvider.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Nancy.Swagger;
-using Nancy.Swagger.Services;
-using 电子展板.Models;
-using 电子展板.Utility.Swagger;
-
-namespace 电子展板.WebModule.ModelMetadata
-{
- public class RetValueDataProvider : ISwaggerModelDataProvider
- {
- ///
- /// 使用自定义特性注解完成配置
- ///
- ///
- public SwaggerModelData GetModelData()
- {
- return SwaggerModelDataUtils.GetModelData();
- }
- }
-}
diff --git a/电子展板/电子展板.csproj b/电子展板/电子展板.csproj
index 2d4a741..4eb9ea7 100644
--- a/电子展板/电子展板.csproj
+++ b/电子展板/电子展板.csproj
@@ -20,10 +20,6 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-->
-
-
-
-
@@ -35,9 +31,12 @@
-
-
+
+
+
+
+