@Jon Krupa The default order is the order in which functions are registered, which is done by enumerating directories containing a function.json
file making it lexicographically sorting all functions. A dirty fix seems to be adding prefixes to function names like below
public class RouteSpecificity
{
[FunctionName("P00_" + nameof(GetDemoProduct))]
public IActionResult GetDemoProduct(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "test/demo/{prod}")] HttpRequest req,
ILogger log
) => new OkObjectResult("Getting Demo Product");
[FunctionName("P01_" + nameof(GetProduct))]
public IActionResult GetProduct(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "test/{cat}/{prod}")] HttpRequest req,
ILogger log
) => new OkObjectResult("Getting Product");
}
There is an open issue that tracks this and has a mention of a community solution to tackle this.