GitHub PullRequestReviewCommentEvent at 2014-01-03 21:07:32
Repository: Hilary
Actor: mrvisser
Payload: {"comment":{"url":"https://api.github.com/repos/oaeproject/Hilary/pulls/comments/8645051","id":8645051,"diff_hunk":"@@ -147,6 +150,42 @@ var setupRouter = module.exports.setupRouter = function(app) {\n     };\n \n     /**\n+     * Use swagger to setup a route on the associated server\n+     *\n+     * @param  {Object}               spec            The swagger spec for the route\n+     * @param  {Function|Function[]}  handler         The function to handle requests to this route\n+     * @param  {String}               [telemetryUrl]  The string to use for telemetry tracking\n+     * @throws {Error}                                Error thrown when arguments aren't of the proper type\n+     */\n+    that.swag = function(spec, handler, telemetryUrl) {\n+        var route = '/api' + spec.path.replace(/\\/{/g, '/:').replace(/\\}/g, '');\n+        var isRouteValid = (_.isString(route) || _.isRegExp(route));","path":"node_modules/oae-util/lib/server.js","position":30,"original_position":30,"commit_id":"324adfac9c23b4fb600eb7babf1bbae42650b34b","original_commit_id":"324adfac9c23b4fb600eb7babf1bbae42650b34b","user":{"login":"mrvisser","id":102265,"avatar_url":"https://gravatar.com/avatar/ad43d99c9520c317fbfe35ff89bd2365?d=https%3A%2F%2Fidenticons.github.com%2Fab7c5f274370ed936faa05e6babb86e1.png&r=x","gravatar_id":"ad43d99c9520c317fbfe35ff89bd2365","url":"https://api.github.com/users/mrvisser","html_url":"https://github.com/mrvisser","followers_url":"https://api.github.com/users/mrvisser/followers","following_url":"https://api.github.com/users/mrvisser/following{/other_user}","gists_url":"https://api.github.com/users/mrvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvisser/subscriptions","organizations_url":"https://api.github.com/users/mrvisser/orgs","repos_url":"https://api.github.com/users/mrvisser/repos","events_url":"https://api.github.com/users/mrvisser/events{/privacy}","received_events_url":"https://api.github.com/users/mrvisser/received_events","type":"User","site_admin":false},"body":"I don't think I know enough about all the parsing we're doing with routes and types to give a good suggestion. I might have some ideas after we've discussed the general question at the end of my review about the motivation behind the parsing.","created_at":"2014-01-03T21:07:32Z","updated_at":"2014-01-03T21:07:32Z","html_url":"https://github.com/oaeproject/Hilary/pull/728#discussion_r8645051","pull_request_url":"https://api.github.com/repos/oaeproject/Hilary/pulls/728","_links":{"self":{"href":"https://api.github.com/repos/oaeproject/Hilary/pulls/comments/8645051"},"html":{"href":"https://github.com/oaeproject/Hilary/pull/728#discussion_r8645051"},"pull_request":{"href":"https://api.github.com/repos/oaeproject/Hilary/pulls/728"}}}}