The documentation for enabling XmlDoc integration into your Web Api projects appears to only handle situations where all of your API types are part of your WebApi project. In particular, it discusses how to reroute the XML documentation to App_Data/XmlDocument.xml
and uncommenting a line in your config that will consume that file. This implicitly only allows for one project's documentation file.
However, in my setup I have my request and response types defined in a common "Models" project. This means that if I have an endpoint defined such as:
[Route("auth/openid/login")]
public async Task<AuthenticationResponse> Login(OpenIdLoginRequest request) { ... }
Where OpenIdLoginRequest
is defined in a separate C# project like so:
public class OpenIdLoginRequest
{
/// <summary>
/// Represents the OpenId provider that authenticated the user. (i.e. Facebook, Google, etc.)
/// </summary>
[Required]
public string Provider { get; set; }
...
}
Despite the XML doccomments, the properties of the request
parameter contain no documentation when you view the endpoint-specific help page (i.e. http://localhost/Help/Api/POST-auth-openid-login
).
How can I make it so that types in subprojects with XML documentation are surfaced in the Web API XML documentation?