You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding Express style parameter regular expression handling, such as /test/:id([a-f\d]{24}) and /test/:num(\d+), to Restify would make working with paramaters in Restify a much nicer experience. In addition it would enable Restify to handle the shared middleware scenarios that it cannot currently support due to parameters being unnamed and an array when regular expressions are used.
You can use regular expressions to validate parameters by including the regular expression in brackets after the parameter name. The pattern /test:id(\d+) will match the url /test/8 and res.params.id will be 8; however the url /test/hello will not match.
Are you willing and able to implement this?
I'm willing to help implement this if I can be pointed in the right direction.
The text was updated successfully, but these errors were encountered:
Feature Request
Adding Express style parameter regular expression handling, such as
/test/:id([a-f\d]{24})
and/test/:num(\d+)
, to Restify would make working with paramaters in Restify a much nicer experience. In addition it would enable Restify to handle the shared middleware scenarios that it cannot currently support due to parameters being unnamed and an array when regular expressions are used.Use Case
A nested scenario.
A custom middleware scenario.
Example API
You can use regular expressions to validate parameters by including the regular expression in brackets after the parameter name. The pattern
/test:id(\d+)
will match the url /test/8 andres.params.id
will be 8; however the url /test/hello will not match.Are you willing and able to implement this?
I'm willing to help implement this if I can be pointed in the right direction.
The text was updated successfully, but these errors were encountered: