Concepts
Params
Path parameters (`ctx.params`) from dynamic segments and catch-all routes.
Params
ctx.params contains values extracted from the matched route's path pattern.
Types
- Static segments: no entry in
ctx.params - Dynamic segments: string values
- Catch-all segments (
[[...x]]):string[]
So ctx.params[id] is either a string or a string[] depending on your route file pattern.
Validation with SCHEMA
If you define SCHEMA.params, Legonode validates and then replaces ctx.params with the validated/coerced values before middleware/handler execution.