我只是想从 swagger 文档中删除单词控制器。我看过使用 IOperationFilter 或 IDocumentFilter 来手动编辑标签,但属性是只读的。
/// <summary>
/// Home
/// </summary>
public class HomeController : ApiController
{
}
我已经按照 GitHub 上的文档启用了 XmlComments。除了我无法更改控制器的描述之外,我没有任何其他问题。
private static string GetXmlCommentsPath()
{
return string.Format(@"{0}\bin\Sample.WebApi.XML", System.AppDomain.CurrentDomain.BaseDirectory);
}
在 Swaggerconfig 中:-
c.IncludeXmlComments(GetXmlCommentsPath());