{"action":"closed","issue":{"url":"https://api.github.com/repos/router5/router5/issues/63","repository_url":"https://api.github.com/repos/router5/router5","labels_url":"https://api.github.com/repos/router5/router5/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/router5/router5/issues/63/comments","events_url":"https://api.github.com/repos/router5/router5/issues/63/events","html_url":"https://github.com/router5/router5/issues/63","id":162954327,"number":63,"title":"Unable to pass parameter with braces","user":{"login":"fairbairn","id":5289625,"avatar_url":"https://avatars.githubusercontent.com/u/5289625?v=3","gravatar_id":"","url":"https://api.github.com/users/fairbairn","html_url":"https://github.com/fairbairn","followers_url":"https://api.github.com/users/fairbairn/followers","following_url":"https://api.github.com/users/fairbairn/following{/other_user}","gists_url":"https://api.github.com/users/fairbairn/gists{/gist_id}","starred_url":"https://api.github.com/users/fairbairn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fairbairn/subscriptions","organizations_url":"https://api.github.com/users/fairbairn/orgs","repos_url":"https://api.github.com/users/fairbairn/repos","events_url":"https://api.github.com/users/fairbairn/events{/privacy}","received_events_url":"https://api.github.com/users/fairbairn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T15:23:28Z","updated_at":"2016-06-29T17:48:50Z","closed_at":"2016-06-29T17:48:50Z","body":"Looking for a way to leverage Link / BaseLink in order to pass an :id parameter as a string-formatted GUID / UUID which has curly braces.\r\n\r\nWith a route of..\r\n\r\nname = record\r\npath = /record/:id\r\n\r\nif I attempt to pass the routeParams of { id : \"{any kind of guid value}\"} the underlying path-parser fails with  \"Some parameters are of invalid format\".\r\n\r\nEven if I encodeURIComponent the guid, it still fails.\r\n\r\nLooking at path-parser, which router5 is based on (correct?), this is the code..\r\n\r\n```\r\nif (!opts.ignoreConstraints) {\r\n            let constraintsPassed = this.tokens\r\n                .filter(t => /^url-parameter/.test(t.type) && !/-splat$/.test(t.type))\r\n                .every(t => new RegExp('^' + defaultOrConstrained(t.otherVal[0]) + '$').test(params[t.val]));\r\n\r\n            if (!constraintsPassed) throw new Error('Some parameters are of invalid format');\r\n        }\r\n```\r\n\r\nI would think we should be able to pass any kind of string into routeParams and it would perform the encoding properly.  The value itself has nothing to do with the pattern for building the path, so I'm unclear why it's failing.\r\n\r\nIs there a way to have Router5 and path-parser accept a key/value pair for route params where the value contains braces?\r\n\r\nDo we need to pass in ignoreContraints to path-parser, and if so, what do we pass into Link or BaseLink in order to achieve this bypass?"}}
{"actor":{"display_login":"troch"}}