When mounting a path with a parameter using mount(), the context map doesn't use the path parameter name and instead uses the param index such as 0, 1 etc.
create a new jooby app
add a mount path
mount("/{id:(foo|bar)}", new TestController());
create TestController with a route
get("", ctx -> {
Map<String, String> test = ctx.pathMap();
String id = ctx.path("id").value();
return id;
});
Expected behavior: The path map would have a key named "id" and the variable id would be non-null
Actual behavior: The path map has an integer key 0 which maps to the value and in this example, id is null when searching for string key "id"
jooby: 3.2.4 JDK 17 Windows 11
When mounting a path with a parameter using mount(), the context map doesn't use the path parameter name and instead uses the param index such as 0, 1 etc.
Expected behavior: The path map would have a key named "id" and the variable id would be non-null Actual behavior: The path map has an integer key 0 which maps to the value and in this example, id is null when searching for string key "id"