path-to-regexp-v8-migration
Installation
SKILL.md
path-to-regexp v6 → v8 Migration
Applies to path in RestEndpoint, resource(), and any string passed to path-to-regexp.
Reference: path-to-regexp README errors section
Migration Rules
Optional parameters
? suffix removed. Wrap the optional segment (including its prefix) in {}.
/:id? → {/:id}
/users/:id? → /users{/:id}
/files/:name? → /files{/:name}