-
Notifications
You must be signed in to change notification settings - Fork 983
Description
- Used appropriate template for the issue type
- Searched both open and closed issues for duplicates of this issue
- Title adequately and concisely reflects the bug
Bug Report
Restify Version
current 7.2.3
Node.js Version
not applicable
Expected behaviour
- The docs should fit the current behaviour/state.
- Work in PR fix(server): remove regexp check from method factory #1679 should be merged into master.
- The docs should clearly explain how RegExp chunks now work
- The updated docs should be live on restify.com/docs
Actual behaviour
Documentation is out of date:
http://restify.com/docs/server-api/#servermethodopts states:
Types
Server~methodOpts
Server method opts
Type: (String | Regexp | Object)
(emphasis mine)
Suggestion
The last line should probably be:
Type: (String | Object)
Additionally, it would be nice if the possibilities to use RegExps would be explained in more detail, e.g. I'm wondering whether that ^\ prefix is always necessary (to me it doesn't make sense in the example). Or at least link to https://github.com/delvedor/find-my-way#supported-path-formats
Related issues and PRs
This problem was already addressed in issue #1644, but the issue was auto-closed because it was stale. The same happened to PR #1679 that should've closed the issue, but was never merged.
Are you able to fix this?
No, because I don't have the permission to merge that PR and because I don't know if that PR already completely fixes the docs entirely.