I have a generic abstract base class that has some methods on it. These methods have XML comments on them as such:
public abstract class BaseController<TModel> : ApiController
{
[HttpPost]
public Task<TModel> Post([FromBody] TModel model)
{
...
return ...
}
}
I would like to be able to implement it as such:
public class PersonController : BaseController<PersonModel>
{
}
And XML comments are created for the PersonController, which mimic the comments for the base class. This will do something like https://github.com/domaindrivendev/Swashbuckle to pick up my XML comments and display them well for PersonController.
Currently, comments are published as follows:
<?xml version="1.0"?>
<doc>
<assembly>
<name>MyLibrary</name>
</assembly>
<members>
<member name="T:MyLibrary.PersonController">
<summary>
Controller for working with instances of PersonModel
</summary>
</member>
<member name="T:MyLibrary.BaseController`1">
<summary>
Controller for working with instances of {TModel}
</summary>
</member>
<member name="M:MyLibrary.BaseController`1.Post(`0)">
<summary>
Creates a {TModel}.
</summary>
</member>
</members>
</doc>
I would like it to also include method documentation for the post method on PersonController:
...
<member name="M:MyLibrary.PersonController.Post(`0)">
<summary>
Creates a PersonModel.
</summary>
</member>
...
, , , , . - ?