0

I am using Sandcastle Help File Builder to document an API. I would like to automate as much of the process as possible, not only to make it easier for the devs to add new routes as they are added, but also to update the documentation. The comments I have so far look like this:

[Authorize]
[HasAction(Actions = "POS")]
[RoutePrefix("api/Command/POS")]
public class CmdPOSController : ApiController {
    ///<summary>API to create new payments from point of sale.</summary>
    ///<param name="json">{amount, confirmationNumber, paymentType}</param>
    ///<returns>Original JSON object is returned.</returns>
    [HttpPost]
    [Route("Payments/Create")]
    public dynamic CreatePayment([FromBody] JToken json) {

My question is, is there any way to get the full route for each API route?

Andrew
  • 1,544
  • 1
  • 18
  • 36
  • Does this method not work? http://stackoverflow.com/questions/18586636/is-it-possible-to-include-custom-attributes-in-sandcastle-documentation – awh112 Feb 03 '17 at 15:14
  • @awh112 Partly, but the issue I run into there is that the project uses RoutePrefix, so the [Route] is only part of the URI needed. It does solve the post attribute issue though. I will update the question. – Andrew Feb 03 '17 at 15:19

0 Answers0