Reputation: 1668
I have the model schema for the REST API body and in response. The XML comments have been defined but I cannot figure out a way to include the XML documentation for the model schema in Swagger UI 3.0 both in API body and in response ?
Upvotes: 0
Views: 1715
Reputation: 1668
I missed this, it works now. I had the schemas spread over different asp.net core assemblies and Swagger UI 3.0 does support adding multiple XML sources.
To include the controller comments itself we have to set 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);
Upvotes: 1