Reputation: 335
I've been following the instructions that talk about creating help pages for the Web API, one example being http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages
I know that to get descriptions for REST paths, you place these xml comments above the respective methods.
/// <summary>
/// Looks up some data by ID.
/// </summary>
/// <param name="id">The ID of the data.</param>
But say I have many paths or many Web API projects and I want to make this process a little faster. Where could I start if I wanted even simple 1 sentence descriptions to be automated. I would be ok, with simple description, maybe pulled from the name or convention of the method name and a mention of the parameter types that it expect. Just very simple stuff to build off of.
I was thinking initially that this automation project would reside in the same solution as the Web API that you're targeting, it would just be another separate project. Thanks.
Upvotes: 0
Views: 132
Reputation: 12476
If you install GhostDoc you can click on a method and press Ctrl
+ Shift
+ D
. That will add all the basic XML doc elements, but it will also try to come up with a simple description of what the method does, what the parameters are and what will be returned by looking at the names, and figuring something out convention-wise. The descriptions are often not very useful, but sometimes they can be. I guess you just have to adapt to their conventions a little bit.
Upvotes: 1