{"action":"created","issue":{"url":"https://api.github.com/repos/expressjs/expressjs.com/issues/623","repository_url":"https://api.github.com/repos/expressjs/expressjs.com","labels_url":"https://api.github.com/repos/expressjs/expressjs.com/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/expressjs.com/issues/623/comments","events_url":"https://api.github.com/repos/expressjs/expressjs.com/issues/623/events","html_url":"https://github.com/expressjs/expressjs.com/pull/623","id":150000557,"number":623,"title":"Restored router.param callback \"name\" parameter","user":{"login":"Jokero","id":434135,"avatar_url":"https://avatars.githubusercontent.com/u/434135?v=3","gravatar_id":"","url":"https://api.github.com/users/Jokero","html_url":"https://github.com/Jokero","followers_url":"https://api.github.com/users/Jokero/followers","following_url":"https://api.github.com/users/Jokero/following{/other_user}","gists_url":"https://api.github.com/users/Jokero/gists{/gist_id}","starred_url":"https://api.github.com/users/Jokero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jokero/subscriptions","organizations_url":"https://api.github.com/users/Jokero/orgs","repos_url":"https://api.github.com/users/Jokero/repos","events_url":"https://api.github.com/users/Jokero/events{/privacy}","received_events_url":"https://api.github.com/users/Jokero/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-04-21T08:18:02Z","updated_at":"2016-04-27T17:39:58Z","closed_at":"2016-04-26T09:02:28Z","pull_request":{"url":"https://api.github.com/repos/expressjs/expressjs.com/pulls/623","html_url":"https://github.com/expressjs/expressjs.com/pull/623","diff_url":"https://github.com/expressjs/expressjs.com/pull/623.diff","patch_url":"https://github.com/expressjs/expressjs.com/pull/623.patch"},"body":"It was deleted from previous version of documentation"},"comment":{"url":"https://api.github.com/repos/expressjs/expressjs.com/issues/comments/215165885","html_url":"https://github.com/expressjs/expressjs.com/pull/623#issuecomment-215165885","issue_url":"https://api.github.com/repos/expressjs/expressjs.com/issues/623","id":215165885,"user":{"login":"crandmck","id":2925364,"avatar_url":"https://avatars.githubusercontent.com/u/2925364?v=3","gravatar_id":"","url":"https://api.github.com/users/crandmck","html_url":"https://github.com/crandmck","followers_url":"https://api.github.com/users/crandmck/followers","following_url":"https://api.github.com/users/crandmck/following{/other_user}","gists_url":"https://api.github.com/users/crandmck/gists{/gist_id}","starred_url":"https://api.github.com/users/crandmck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crandmck/subscriptions","organizations_url":"https://api.github.com/users/crandmck/orgs","repos_url":"https://api.github.com/users/crandmck/repos","events_url":"https://api.github.com/users/crandmck/events{/privacy}","received_events_url":"https://api.github.com/users/crandmck/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T17:39:58Z","updated_at":"2016-04-27T17:39:58Z","body":"@Jokero Maybe you can clarify for me.  I appreciate your patience.\r\n\r\nIf I understand what you're saying: the callback args are available within the callback function.  Obviously, if the callback signature can handle them, then the system passes the args to the callback.    But my question is do you _have to_ provide them when you define the callback function that you pass to `router.param` ?\r\n \r\nWe state that the callback takes 5 args: req, res, next, value of the name parameter, the name of the (name) parameter.  But then we have the example where the cb is provided with 4 args:\r\n```\r\nrouter.param('user', function(req, res, next, id) {\r\n  ...\r\n})\r\n```\r\n\r\nLooking around, I see another example where the cb is only provided with 3 args:\r\n```\r\nrouter.param('postId', function(request, response, next) {\r\n  ...\r\n})\r\n```\r\n\r\nSo, unless these examples are wrong, you are not required to provide the last two arguments in the callback to `router.param()`.   Are you _required_ to provide them in your definition of the callback function in the call to `router.param`?    But it seems to me that you are not _required_ to define your callback with those arguments.\r\n\r\nI just want to tell people how to write their code, and whether the MUST provide _all_ these args to the callback function to `router.param` or not.  \r\n\r\nIf you are always required to provide all 5 arguments when you define the callback function for `router.param`, then we should say that and change the example.  Otherwise, I think its worthwhile to note which you must always provide (i.e. are required) and which are optional.  If that's unclear, then perhaps I should add a note to clarify what we mean.\r\n"}}