add tags for doc

This commit is contained in:
2026-03-26 00:52:52 +08:00
parent b2ec94e957
commit c8b78ce86d
+13 -3
View File
@@ -12,12 +12,12 @@ public class SimApiDocAttribute : SwaggerOperationAttribute
/// <summary> /// <summary>
/// 定义接口说明 /// 定义接口说明
/// </summary> /// </summary>
/// <param name="tag">接口分组</param> /// <param name="tags">接口分组列表</param>
/// <param name="name">接口名称</param> /// <param name="name">接口名称</param>
/// <param name="description">接口描述</param> /// <param name="description">接口描述</param>
public SimApiDocAttribute(string tag, string name, string? description = null) public SimApiDocAttribute(string[] tags, string name, string? description = null)
{ {
Tags = [tag]; Tags = tags;
Summary = name; Summary = name;
if (description != null) if (description != null)
{ {
@@ -26,4 +26,14 @@ public class SimApiDocAttribute : SwaggerOperationAttribute
// Consumes = new[] {"application/json"}; // Consumes = new[] {"application/json"};
// Produces = new[] {"application/json"}; // Produces = new[] {"application/json"};
} }
/// <summary>
/// 定义接口说明
/// </summary>
/// <param name="tag">接口分组</param>
/// <param name="name">接口名称</param>
/// <param name="description">接口描述</param>
public SimApiDocAttribute(string tag, string name, string? description = null) : this([tag], name, description)
{
}
} }