I'm having a really simple issue that I cannot figure out how to word in search results so I'm hoping I can find the solution here by explaining.
I'm exploring the Helppage area in ASP.NET WebAPI. Currently I have a new endpoint set that accepts:
GET api/status/{id}
However when I look at the WebAPI auto generated Helparea documentation it shows this:
GET api/status/?id={id}
Can you either point me in the right direction to a good resource that explains how to format my xml comments correctly, or explain what I need to do to get the Helparea documentation to generate correctly.
I'm relatively new to ASP.NET so please let me know if I need to clarify anything regarding this and I'll be glad to.
Thanks for all the help and suggestions in advance.
This is where the endpoint is created
/// GET: api/status/{id}
/// <summary>
/// Summary of my endpoint
/// </summary>
///
/// <param name="id">summary of the param</param>
/// <returns>What it returns</returns>
[AllowAnonymous]
public IHttpActionResult GetStatus(string id)
{
// Doing stuff here
return Ok();
}
This is my WebApiConfig.cs
namespace TestAPI
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Configure Web API to use only bearer token authentication.
config.SuppressDefaultHostAuthentication();
config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}
