![](/img/trans.png)
[英]How to swagger-document an ASP.NET Core action which reads Request.Body directly
[英]Swagger 3.0 ASP.NET Core - How to add documentation for Model Schema in request Body and Response
我錯過了這個,它現在可以工作了。 我將架構分布在不同的 asp.net 核心組件上,而 Swagger UI 3.0 確實支持添加多個 XML 源。
要包含 controller 評論本身,我們必須設置 includeControllerXmlComments: true
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "test1.xml"), includeControllerXmlComments: true);
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "test2.xml"), includeControllerXmlComments: true);
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "test3.xml"), includeControllerXmlComments: true);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.