{"action":"created","comment":{"url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/comments/194658176","pull_request_review_id":127869122,"id":194658176,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDY1ODE3Ng==","diff_hunk":"@@ -17,14 +17,143 @@ import Kitura\n import KituraContracts\n \n func initialize{{resource}}Routes(app: App) {\n-{{#each routes}}\n+{{#if generatecodable}}\n+  {{#if hascodable}}\n+    // Handlers for codable routes are declared below:\n+    //\n+  {{/if}}\n+  {{#each routedetail}}\n+    {{#ifequal this.method \"delete\"}}\n+      {{#if this.codable}}\n+        {{#ifequal this.variant \"all\"}}\n+    func deleteAll_{{this.handlerName}}(completion: (RequestError?) -> Void ) -> Void {\n+        completion(.notImplemented)\n+    }\n+        {{/ifequal}}\n+        {{#ifequal this.variant \"id\"}}\n+    func deleteOne_{{this.handlerName}}(id: {{this.idtype}}, completion: (RequestError?) -> Void ) -> Void {\n+        completion(.notImplemented)\n+    }\n+\n+        {{/ifequal}}\n+      {{/if}}\n+    {{/ifequal}}\n+    {{#ifequal this.method \"get\"}}\n+      {{#if this.codable}}\n+        {{#ifequal this.variant \"all\"}}\n+    func getAll_{{this.handlerName}}(completion: ([{{this.response}}]?, RequestError?) -> Void ) -> Void {\n+        completion(nil, .notImplemented)\n+    }\n+        {{/ifequal}}\n+        {{#ifequal this.variant \"id\"}}\n+    func getOne_{{this.handlerName}}(id: {{this.idtype}}, completion: ({{this.response}}?, RequestError?) -> Void ) -> Void {\n+        completion(nil, .notImplemented)\n+    }\n+        {{/ifequal}}\n+        {{#ifequal this.variant \"noid\"}}\n+    func get_{{this.handlerName}}(completion: ({{this.response}}?, RequestError?) -> Void ) -> Void {\n+        completion(nil, .notImplemented)\n+    }\n+        {{/ifequal}}\n+\n+      {{/if}}\n+    {{/ifequal}}\n+    {{#ifequal this.method \"patch\"}}\n+      {{#if this.codable}}\n+    func patchOne_{{this.handlerName}}(id: {{this.idtype}}, patch: {{this.param}}, completion: ({{this.param}}?, RequestError?) -> Void ) -> Void {\n+        completion(nil, .notImplemented)\n+    }\n+\n+      {{/if}}\n+    {{/ifequal}}\n+    {{#ifequal this.method \"post\"}}\n+      {{#if this.codable}}\n+        {{#ifequal this.variant \"noid\"}}\n+    func post_{{this.handlerName}}(post: {{this.param}}, completion: ({{this.param}}?, RequestError?) -> Void ) -> Void {\n+        completion(nil, .notImplemented)\n+    }\n+        {{/ifequal}}\n+        {{#ifequal this.variant \"id\"}}\n+    func postOne_{{this.handlerName}}(post: {{this.param}}, completion: ({{this.idtype}}?, {{this.param}}?, RequestError?) -> Void ) -> Void {\n+        completion(nil, nil, .notImplemented)\n+    }\n+        {{/ifequal}}\n+\n+      {{/if}}\n+    {{/ifequal}}\n+    {{#ifequal this.method \"put\"}}\n+      {{#if this.codable}}\n+    func putOne_{{this.handlerName}}(id: {{this.idtype}}, put: {{this.param}}, completion: ({{this.param}}?, RequestError?) -> Void ) -> Void {\n+        completion(nil, .notImplemented)\n+    }\n+\n+      {{/if}}\n+    {{/ifequal}}\n+  {{/each}}\n+\n+  {{#if hascodable}}\n+    // Codable routes are declared below:\n+    //\n+  {{/if}}\n+  {{#each routedetail}}\n+{{#if this.codable}}\n+    {{#ifequal this.method \"delete\"}}\n+      {{#ifequal this.variant \"all\"}}\n+    app.router.{{this.method}}(\"{{#if ../basepath}}\\(basePath){{/if}}{{this.route}}\", handler: deleteAll_{{this.handlerName}})","path":"refresh/templates/fromswagger/Routes.swift.hbs","position":87,"original_position":87,"commit_id":"b6e05e6653f5d7d02ed81a366617d24c4e8ad381","original_commit_id":"b6e05e6653f5d7d02ed81a366617d24c4e8ad381","user":{"login":"EnriqueL8","id":30461857,"node_id":"MDQ6VXNlcjMwNDYxODU3","avatar_url":"https://avatars2.githubusercontent.com/u/30461857?v=4","gravatar_id":"","url":"https://api.github.com/users/EnriqueL8","html_url":"https://github.com/EnriqueL8","followers_url":"https://api.github.com/users/EnriqueL8/followers","following_url":"https://api.github.com/users/EnriqueL8/following{/other_user}","gists_url":"https://api.github.com/users/EnriqueL8/gists{/gist_id}","starred_url":"https://api.github.com/users/EnriqueL8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnriqueL8/subscriptions","organizations_url":"https://api.github.com/users/EnriqueL8/orgs","repos_url":"https://api.github.com/users/EnriqueL8/repos","events_url":"https://api.github.com/users/EnriqueL8/events{/privacy}","received_events_url":"https://api.github.com/users/EnriqueL8/received_events","type":"User","site_admin":false},"body":"I believe we should verify the BasePath before","created_at":"2018-06-12T08:43:27Z","updated_at":"2018-06-12T08:43:27Z","html_url":"https://github.com/IBM-Swift/generator-swiftserver/pull/555#discussion_r194658176","pull_request_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/comments/194658176"},"html":{"href":"https://github.com/IBM-Swift/generator-swiftserver/pull/555#discussion_r194658176"},"pull_request":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555"}}},"pull_request":{"url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555","id":192034889,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMDM0ODg5","html_url":"https://github.com/IBM-Swift/generator-swiftserver/pull/555","diff_url":"https://github.com/IBM-Swift/generator-swiftserver/pull/555.diff","patch_url":"https://github.com/IBM-Swift/generator-swiftserver/pull/555.patch","issue_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/555","number":555,"state":"open","locked":false,"title":"Codable routes","user":{"login":"nhardman","id":18440568,"node_id":"MDQ6VXNlcjE4NDQwNTY4","avatar_url":"https://avatars3.githubusercontent.com/u/18440568?v=4","gravatar_id":"","url":"https://api.github.com/users/nhardman","html_url":"https://github.com/nhardman","followers_url":"https://api.github.com/users/nhardman/followers","following_url":"https://api.github.com/users/nhardman/following{/other_user}","gists_url":"https://api.github.com/users/nhardman/gists{/gist_id}","starred_url":"https://api.github.com/users/nhardman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhardman/subscriptions","organizations_url":"https://api.github.com/users/nhardman/orgs","repos_url":"https://api.github.com/users/nhardman/repos","events_url":"https://api.github.com/users/nhardman/events{/privacy}","received_events_url":"https://api.github.com/users/nhardman/received_events","type":"User","site_admin":false},"body":"feat: add codable routing generation","created_at":"2018-06-01T13:29:22Z","updated_at":"2018-06-12T08:43:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f907a48675ab3b4cb2e6c81107ed0c5b4a8daef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555/commits","review_comments_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555/comments","review_comment_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/555/comments","statuses_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/statuses/b6e05e6653f5d7d02ed81a366617d24c4e8ad381","head":{"label":"IBM-Swift:codable-routes","ref":"codable-routes","sha":"b6e05e6653f5d7d02ed81a366617d24c4e8ad381","user":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"repo":{"id":72868926,"node_id":"MDEwOlJlcG9zaXRvcnk3Mjg2ODkyNg==","name":"generator-swiftserver","full_name":"IBM-Swift/generator-swiftserver","owner":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBM-Swift/generator-swiftserver","description":"Generator for Kitura REST webservice servers","fork":false,"url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver","forks_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/forks","keys_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/teams","hooks_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/hooks","issue_events_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/events{/number}","events_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/events","assignees_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/assignees{/user}","branches_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/branches{/branch}","tags_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/tags","blobs_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/statuses/{sha}","languages_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/languages","stargazers_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/stargazers","contributors_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/contributors","subscribers_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/subscribers","subscription_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/subscription","commits_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/contents/{+path}","compare_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/merges","archive_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/downloads","issues_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues{/number}","pulls_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls{/number}","milestones_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/milestones{/number}","notifications_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/labels{/name}","releases_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/releases{/id}","deployments_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/deployments","created_at":"2016-11-04T17:12:03Z","updated_at":"2018-06-06T02:41:15Z","pushed_at":"2018-06-11T20:05:20Z","git_url":"git://github.com/IBM-Swift/generator-swiftserver.git","ssh_url":"git@github.com:IBM-Swift/generator-swiftserver.git","clone_url":"https://github.com/IBM-Swift/generator-swiftserver.git","svn_url":"https://github.com/IBM-Swift/generator-swiftserver","homepage":null,"size":2326,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":22,"open_issues":11,"watchers":53,"default_branch":"develop"}},"base":{"label":"IBM-Swift:develop","ref":"develop","sha":"66c87b00a9a4e322c4d1dc61605daa28e055ae04","user":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"repo":{"id":72868926,"node_id":"MDEwOlJlcG9zaXRvcnk3Mjg2ODkyNg==","name":"generator-swiftserver","full_name":"IBM-Swift/generator-swiftserver","owner":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBM-Swift/generator-swiftserver","description":"Generator for Kitura REST webservice servers","fork":false,"url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver","forks_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/forks","keys_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/teams","hooks_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/hooks","issue_events_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/events{/number}","events_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/events","assignees_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/assignees{/user}","branches_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/branches{/branch}","tags_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/tags","blobs_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/statuses/{sha}","languages_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/languages","stargazers_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/stargazers","contributors_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/contributors","subscribers_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/subscribers","subscription_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/subscription","commits_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/contents/{+path}","compare_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/merges","archive_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/downloads","issues_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues{/number}","pulls_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls{/number}","milestones_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/milestones{/number}","notifications_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/labels{/name}","releases_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/releases{/id}","deployments_url":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/deployments","created_at":"2016-11-04T17:12:03Z","updated_at":"2018-06-06T02:41:15Z","pushed_at":"2018-06-11T20:05:20Z","git_url":"git://github.com/IBM-Swift/generator-swiftserver.git","ssh_url":"git@github.com:IBM-Swift/generator-swiftserver.git","clone_url":"https://github.com/IBM-Swift/generator-swiftserver.git","svn_url":"https://github.com/IBM-Swift/generator-swiftserver","homepage":null,"size":2326,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":22,"open_issues":11,"watchers":53,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555"},"html":{"href":"https://github.com/IBM-Swift/generator-swiftserver/pull/555"},"issue":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/555"},"comments":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/issues/555/comments"},"review_comments":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555/comments"},"review_comment":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/pulls/555/commits"},"statuses":{"href":"https://api.github.com/repos/IBM-Swift/generator-swiftserver/statuses/b6e05e6653f5d7d02ed81a366617d24c4e8ad381"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"EnriqueL8"}}