I have a solution in VS2013 with several class libraries and a Web API project. I am running into a few problems when setting up Swagger UI. First, when I setup swashbuckle for my Web API project, I can only point to one documentation XML file. Is there a way to point to include multiple XML files so that Swagger not only picks up documentation for my routes in controller but also the domain objects from my other projects as well? Here is my code from SwaggerConfig.cs
SwaggerSpecConfig.Customize
(
c =>
{
c.IncludeXmlComments(Path.Combine(dirPath, projName + ".xml"));
}
);
If I add multiple XML files, it only picks up the last file from IncludeXmlComments.
Second, I am using camel case for my DTOs when returning in JSON
formats.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
However when I look at the response model and model schema in Response Class in Swagger UI, I see the exact class property names instead of the JSON schema which is returned when an endpoint is hit. Is there a way to show the exact JSON schema in the Swagger UI documentation page?