Skip to content

Help Pages and Strongly Typed Client API

fonlow edited this page May 21, 2018 · 2 revisions

Help Pages for ASP.NET Web API is based on the info of controllers provided by ApiExplorer.

In older versions of WebApiClientGen before v2.4.1, the doc comments generated depends on XmlDocumentationProvider which read the XML documentation of the Web API.

WebApiClientGen v2.4.1 reads the XML documentation of the Web API directly, thus you don't need to enable XmlDocumentationProvider for doc comments in client APIs generated. If you want both Help Pages and doc comments in client APIs, you need to make sure that in HelpPageConfig, you have such line:

config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("bin/YourWebApiAssemblyName.xml")));

And in project properties, set Output XML documentation file as "bin\YourWebApiAssemblyName.xml".

With the .NET Core build of WebApiClientGen, the doc comments in the generated codes are directly imported from the XML file of the .NET Core Web API assembly, since the .NET Core Web API does not come with XML documentation provider.

You can’t perform that action at this time.