When I make a request like “/api/countries/dosomething”, I am receiving the following error:
{"Message":"The request is invalid.","MessageDetail":"The parameters dictionary contains a null entry for parameter 'id'
of non-nullable type 'System.Int32' for method 'System.String Get(Int32)' in 'SampleOwinApp.CountriesController'. An op
tional parameter must be a reference type, a nullable type, or be declared as an optional parameter."}
Controller:
```
[RoutePrefix("api/countries")]
public class CountriesController : ApiController
{
[Route("{id}")]
public string Get(int id)
{
return "country info";
}
[HttpGet]
[Route("dosomething")]
public string DoSomething()
{
return "DoSomething";
}
}
```
__Expected__: When user does not specify an order explicitly, we should have a default ordering where the most specific routes come before any routes having variables.
{"Message":"The request is invalid.","MessageDetail":"The parameters dictionary contains a null entry for parameter 'id'
of non-nullable type 'System.Int32' for method 'System.String Get(Int32)' in 'SampleOwinApp.CountriesController'. An op
tional parameter must be a reference type, a nullable type, or be declared as an optional parameter."}
Controller:
```
[RoutePrefix("api/countries")]
public class CountriesController : ApiController
{
[Route("{id}")]
public string Get(int id)
{
return "country info";
}
[HttpGet]
[Route("dosomething")]
public string DoSomething()
{
return "DoSomething";
}
}
```
__Expected__: When user does not specify an order explicitly, we should have a default ordering where the most specific routes come before any routes having variables.