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