Using typed parameters to the method def sidesteps this issue, and neatly allows us to provide the captured value to the user. This is also more in line with how we handle inputs in general: cookies, known/typed query params, unknown query params, json input, form fields, etc.
subpath = true
as a named argument passed to the annotation runs into issues if multiple named arguments are present (see https://stackoverflow.com/questions/55032173/how-to-use-named-arguments-in-scala-user-defined-annotations), which prevents us from using named arguments to the annotation more broadly as a user-facing API.Using typed parameters to the method
def
sidesteps this issue, and neatly allows us to provide the captured value to the user. This is also more in line with how we handle inputs in general: cookies, known/typed query params, unknown query params, json input, form fields, etc.