{"action":"created","issue":{"url":"https://api.github.com/repos/evantahler/actionhero/issues/728","labels_url":"https://api.github.com/repos/evantahler/actionhero/issues/728/labels{/name}","comments_url":"https://api.github.com/repos/evantahler/actionhero/issues/728/comments","events_url":"https://api.github.com/repos/evantahler/actionhero/issues/728/events","html_url":"https://github.com/evantahler/actionhero/pull/728","id":124148077,"number":728,"title":"enable `matchTrailingPathParts` in router","user":{"login":"evantahler","id":303226,"avatar_url":"https://avatars.githubusercontent.com/u/303226?v=3","gravatar_id":"","url":"https://api.github.com/users/evantahler","html_url":"https://github.com/evantahler","followers_url":"https://api.github.com/users/evantahler/followers","following_url":"https://api.github.com/users/evantahler/following{/other_user}","gists_url":"https://api.github.com/users/evantahler/gists{/gist_id}","starred_url":"https://api.github.com/users/evantahler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evantahler/subscriptions","organizations_url":"https://api.github.com/users/evantahler/orgs","repos_url":"https://api.github.com/users/evantahler/repos","events_url":"https://api.github.com/users/evantahler/events{/privacy}","received_events_url":"https://api.github.com/users/evantahler/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-29T01:20:10Z","updated_at":"2016-01-01T20:20:59Z","closed_at":"2016-01-01T18:23:12Z","pull_request":{"url":"https://api.github.com/repos/evantahler/actionhero/pulls/728","html_url":"https://github.com/evantahler/actionhero/pull/728","diff_url":"https://github.com/evantahler/actionhero/pull/728.diff","patch_url":"https://github.com/evantahler/actionhero/pull/728.patch"},"body":"Enables a new option, `matchTrailingPathParts` which you can enable in the router to match combination paths: \r\n\r\n```javascript\r\npost: [\r\n  // yes match: site.com/api/123\r\n  // no match: site.com/api/123/admin\r\n  { path: '/login/:userId(/.*/)', action: 'login' }\r\n],\r\n\r\npost: [\r\n  // yes match: site.com/api/123\r\n  // yes match: site.com/api/123/admin\r\n  { path: '/login/:userId(/.*/)', action: 'login', matchTrailingPathParts: true }\r\n],\r\n```\r\n\r\nThis also enables \"catch all\" routes, like: \r\n\r\n```javascript\r\nget: [\r\n  { path: ':path(/.*/)', action: 'catchAll', matchTrailingPathParts: true }\r\n],\r\n```\r\n\r\nIf you have a route with multiple variables defined and `matchTrailingPathParts` is true, only the final segment will match the trailing sections:\r\n\r\n```javascript\r\nget: [\r\n  // the route site.com/users/123/should/do/a/thing would become {userId: 123, path: '/should/do/a/thing'}\r\n  { path: '/users/:userId/:path(/.*/)', action: 'catchAll', matchTrailingPathParts: true }\r\n],\r\n```"},"comment":{"url":"https://api.github.com/repos/evantahler/actionhero/issues/comments/168335684","html_url":"https://github.com/evantahler/actionhero/pull/728#issuecomment-168335684","issue_url":"https://api.github.com/repos/evantahler/actionhero/issues/728","id":168335684,"user":{"login":"l0oky","id":5659846,"avatar_url":"https://avatars.githubusercontent.com/u/5659846?v=3","gravatar_id":"","url":"https://api.github.com/users/l0oky","html_url":"https://github.com/l0oky","followers_url":"https://api.github.com/users/l0oky/followers","following_url":"https://api.github.com/users/l0oky/following{/other_user}","gists_url":"https://api.github.com/users/l0oky/gists{/gist_id}","starred_url":"https://api.github.com/users/l0oky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l0oky/subscriptions","organizations_url":"https://api.github.com/users/l0oky/orgs","repos_url":"https://api.github.com/users/l0oky/repos","events_url":"https://api.github.com/users/l0oky/events{/privacy}","received_events_url":"https://api.github.com/users/l0oky/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T20:20:59Z","updated_at":"2016-01-01T20:20:59Z","body":"Looks cool. Getting closer to RESTful API develompent I guess."}}