I'm tring to filter a route with param, but no success. I have 2 routes:
/all
/:id
I'm using typescript-rest to dynamic load, so there's no way to add the all route first.
Server.loadServices(this.appWebApi, 'app/resources/*.js', `${__dirname}`);
I have this 2 methods:
@GET
@Path("all")
async all(@Context context: ServiceContext) {}
@GET
@Path(":id")
async findById(@Context context: ServiceContext, @PathParam("id") id: string) {}
But both is called when i use /all
. I tried to use ^(?!all):id
but the parameter is not working.
So, how to filter this 2 routes?