{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments/88859405","pull_request_review_id":9417721,"id":88859405,"diff_hunk":"@@ -0,0 +1,86 @@\n+// Copyright IBM Corp. 2014,2016. All Rights Reserved.\n+// Node module: strong-remoting\n+// This file is licensed under the Artistic License 2.0.\n+// License text available at https://opensource.org/licenses/Artistic-2.0\n+\n+'use strict';\n+\n+var GeoPoint = require('loopback-datatype-geopoint');\n+var jsonFormContext = require('./_jsonform.context');\n+\n+module.exports = function(ctx) {\n+  ctx = jsonFormContext(ctx);\n+  var EMPTY_BODY = ctx.EMPTY_BODY;\n+  var ERROR_BAD_REQUEST = ctx.ERROR_BAD_REQUEST;\n+  var verifyTestCases = ctx.verifyTestCases;\n+\n+  describe('json form - geopoint - required', function() {\n+    // See verifyTestCases' jsdoc for details about the format of test cases.\n+    verifyTestCases({ arg: 'arg', type: 'geopoint', required: true }, [\n+      // Valid values\n+      [{ arg: { lat: 2.5, lng: 3.2 }}, new GeoPoint(2.5, 3.2)],\n+      [{ arg: [2.5, 3.2] }, new GeoPoint(2.5, 3.2)],\n+\n+      // Empty values trigger ERROR_BAD_REQUEST\n+      [EMPTY_BODY, ERROR_BAD_REQUEST],\n+      [{ arg: null }, ERROR_BAD_REQUEST],\n+      [{ arg: '' }, ERROR_BAD_REQUEST],\n+      [{ arg: {}}, ERROR_BAD_REQUEST],\n+      [{ arg: [] }, ERROR_BAD_REQUEST],\n+    ]);\n+  });\n+\n+  describe('json form - geopoint - optional', function() {\n+    // See verifyTestCases' jsdoc for details about the format of test cases.\n+    verifyTestCases({ arg: 'arg', type: 'geopoint' }, [\n+      // Empty values\n+      [EMPTY_BODY, undefined],\n+      // [{ arg: null }, null],\n+      // [{ arg: {}}, {}],\n+      // [{ arg: [] }, {}],","path":"test/rest-coercion/jsonform-geopoint.suite.js","position":40,"original_position":40,"commit_id":"4303ae7682cf957ceddd7f86ec0a26c824dcd729","original_commit_id":"4303ae7682cf957ceddd7f86ec0a26c824dcd729","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"body":"Why are these three lines commented out? Either un-comment and keep them, or remove them completely.","created_at":"2016-11-21T09:51:26Z","updated_at":"2016-11-21T09:53:22Z","html_url":"https://github.com/strongloop/strong-remoting/pull/383#discussion_r88859405","pull_request_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383","_links":{"self":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments/88859405"},"html":{"href":"https://github.com/strongloop/strong-remoting/pull/383#discussion_r88859405"},"pull_request":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383","id":92997778,"html_url":"https://github.com/strongloop/strong-remoting/pull/383","diff_url":"https://github.com/strongloop/strong-remoting/pull/383.diff","patch_url":"https://github.com/strongloop/strong-remoting/pull/383.patch","issue_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/383","number":383,"state":"open","locked":false,"title":"Add coercion support for loopback data type: geopoint","user":{"login":"gunjpan","id":14811089,"avatar_url":"https://avatars.githubusercontent.com/u/14811089?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjpan","html_url":"https://github.com/gunjpan","followers_url":"https://api.github.com/users/gunjpan/followers","following_url":"https://api.github.com/users/gunjpan/following{/other_user}","gists_url":"https://api.github.com/users/gunjpan/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjpan/subscriptions","organizations_url":"https://api.github.com/users/gunjpan/orgs","repos_url":"https://api.github.com/users/gunjpan/repos","events_url":"https://api.github.com/users/gunjpan/events{/privacy}","received_events_url":"https://api.github.com/users/gunjpan/received_events","type":"User","site_admin":false},"body":"Connect to #365 \r\n\r\n**Update 17/11/16**:\r\n  - Blocked until new geopoint module is published\r\n**Update 18/11/16**:\r\n - Updated implementation to use new module, will rebase once new module is published on npm","created_at":"2016-11-09T16:46:22Z","updated_at":"2016-11-21T09:53:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52b1ebc2c17d91afd53f3c031a25e0042a7df082","assignee":{"login":"gunjpan","id":14811089,"avatar_url":"https://avatars.githubusercontent.com/u/14811089?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjpan","html_url":"https://github.com/gunjpan","followers_url":"https://api.github.com/users/gunjpan/followers","following_url":"https://api.github.com/users/gunjpan/following{/other_user}","gists_url":"https://api.github.com/users/gunjpan/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjpan/subscriptions","organizations_url":"https://api.github.com/users/gunjpan/orgs","repos_url":"https://api.github.com/users/gunjpan/repos","events_url":"https://api.github.com/users/gunjpan/events{/privacy}","received_events_url":"https://api.github.com/users/gunjpan/received_events","type":"User","site_admin":false},"assignees":[{"login":"gunjpan","id":14811089,"avatar_url":"https://avatars.githubusercontent.com/u/14811089?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjpan","html_url":"https://github.com/gunjpan","followers_url":"https://api.github.com/users/gunjpan/followers","following_url":"https://api.github.com/users/gunjpan/following{/other_user}","gists_url":"https://api.github.com/users/gunjpan/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjpan/subscriptions","organizations_url":"https://api.github.com/users/gunjpan/orgs","repos_url":"https://api.github.com/users/gunjpan/repos","events_url":"https://api.github.com/users/gunjpan/events{/privacy}","received_events_url":"https://api.github.com/users/gunjpan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383/commits","review_comments_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383/comments","review_comment_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/383/comments","statuses_url":"https://api.github.com/repos/strongloop/strong-remoting/statuses/4303ae7682cf957ceddd7f86ec0a26c824dcd729","head":{"label":"strongloop:fix/geopoint-support","ref":"fix/geopoint-support","sha":"4303ae7682cf957ceddd7f86ec0a26c824dcd729","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":10045175,"name":"strong-remoting","full_name":"strongloop/strong-remoting","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/strong-remoting","description":"Communicate between objects in servers, mobile apps, and other servers.","fork":false,"url":"https://api.github.com/repos/strongloop/strong-remoting","forks_url":"https://api.github.com/repos/strongloop/strong-remoting/forks","keys_url":"https://api.github.com/repos/strongloop/strong-remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/strong-remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/strong-remoting/teams","hooks_url":"https://api.github.com/repos/strongloop/strong-remoting/hooks","issue_events_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/strong-remoting/events","assignees_url":"https://api.github.com/repos/strongloop/strong-remoting/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/strong-remoting/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/strong-remoting/tags","blobs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/strong-remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/strong-remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/strong-remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/strong-remoting/languages","stargazers_url":"https://api.github.com/repos/strongloop/strong-remoting/stargazers","contributors_url":"https://api.github.com/repos/strongloop/strong-remoting/contributors","subscribers_url":"https://api.github.com/repos/strongloop/strong-remoting/subscribers","subscription_url":"https://api.github.com/repos/strongloop/strong-remoting/subscription","commits_url":"https://api.github.com/repos/strongloop/strong-remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/strong-remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/strong-remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/strong-remoting/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/strong-remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/strong-remoting/merges","archive_url":"https://api.github.com/repos/strongloop/strong-remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/strong-remoting/downloads","issues_url":"https://api.github.com/repos/strongloop/strong-remoting/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/strong-remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/strong-remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/strong-remoting/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/strong-remoting/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/strong-remoting/deployments","created_at":"2013-05-14T01:53:04Z","updated_at":"2016-11-09T07:39:32Z","pushed_at":"2016-11-18T21:49:47Z","git_url":"git://github.com/strongloop/strong-remoting.git","ssh_url":"git@github.com:strongloop/strong-remoting.git","clone_url":"https://github.com/strongloop/strong-remoting.git","svn_url":"https://github.com/strongloop/strong-remoting","homepage":"www.strongloop.com","size":1818,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":23,"forks":63,"open_issues":23,"watchers":71,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"d2037311b379b36f781a091379f1a4da927b629d","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":10045175,"name":"strong-remoting","full_name":"strongloop/strong-remoting","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/strong-remoting","description":"Communicate between objects in servers, mobile apps, and other servers.","fork":false,"url":"https://api.github.com/repos/strongloop/strong-remoting","forks_url":"https://api.github.com/repos/strongloop/strong-remoting/forks","keys_url":"https://api.github.com/repos/strongloop/strong-remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/strong-remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/strong-remoting/teams","hooks_url":"https://api.github.com/repos/strongloop/strong-remoting/hooks","issue_events_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/strong-remoting/events","assignees_url":"https://api.github.com/repos/strongloop/strong-remoting/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/strong-remoting/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/strong-remoting/tags","blobs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/strong-remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/strong-remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/strong-remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/strong-remoting/languages","stargazers_url":"https://api.github.com/repos/strongloop/strong-remoting/stargazers","contributors_url":"https://api.github.com/repos/strongloop/strong-remoting/contributors","subscribers_url":"https://api.github.com/repos/strongloop/strong-remoting/subscribers","subscription_url":"https://api.github.com/repos/strongloop/strong-remoting/subscription","commits_url":"https://api.github.com/repos/strongloop/strong-remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/strong-remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/strong-remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/strong-remoting/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/strong-remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/strong-remoting/merges","archive_url":"https://api.github.com/repos/strongloop/strong-remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/strong-remoting/downloads","issues_url":"https://api.github.com/repos/strongloop/strong-remoting/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/strong-remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/strong-remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/strong-remoting/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/strong-remoting/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/strong-remoting/deployments","created_at":"2013-05-14T01:53:04Z","updated_at":"2016-11-09T07:39:32Z","pushed_at":"2016-11-18T21:49:47Z","git_url":"git://github.com/strongloop/strong-remoting.git","ssh_url":"git@github.com:strongloop/strong-remoting.git","clone_url":"https://github.com/strongloop/strong-remoting.git","svn_url":"https://github.com/strongloop/strong-remoting","homepage":"www.strongloop.com","size":1818,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":23,"forks":63,"open_issues":23,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383"},"html":{"href":"https://github.com/strongloop/strong-remoting/pull/383"},"issue":{"href":"https://api.github.com/repos/strongloop/strong-remoting/issues/383"},"comments":{"href":"https://api.github.com/repos/strongloop/strong-remoting/issues/383/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/383/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/strong-remoting/statuses/4303ae7682cf957ceddd7f86ec0a26c824dcd729"}}}}
{"actor":{"display_login":"bajtos"}}