using Swashbuckle.AspNetCore.Annotations; namespace YYApi.Attributes { /// /// 快捷自定义接口文档类 /// public class YYDocAttribute : SwaggerOperationAttribute { /// /// 定义接口说明 /// /// 接口分组 /// 接口名称 public YYDocAttribute(string tag, string name) { Tags = new[] { tag }; Summary = name; // Consumes = new[] {"application/json"}; // Produces = new[] {"application/json"}; } } }