RestPath is not valid for "/{variable}" routes

Hi there,

I am getting an error when trying to use a route where the URL param is after the base root, is there a way around this?

Code:

[Route("/{Id}", Matches="AcceptsHtml")]
public class AppRoute1Request {
    public string Id { get; set; }
}
...
public class AppRouteService : Service
{
    public object Any(AppRoute1Request request) => Request.GetPageResult("/[partnerId].html");
    ...
}

If you don’t have a prefix it would match every single path route, which you can only do with a FallbackRoute.

1 Like