using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace ZanLveCore { public class AuthTagDescriptions : IDocumentFilter { public void Apply(SwaggerDocument swaggerDoc, DocumentFilterContext context) { swaggerDoc.Tags = new List<Tag> { new Tag{ Name="Common",Description="授权中心接口"}, }; } } }
options.DocumentFilter<AuthTagDescriptions>();
五、ASP.NET Core 在 Swagger UI 中显示Controller描述
原文:https://www.cnblogs.com/fger/p/12096033.html