GitHub PullRequestReviewCommentEvent at 2014-11-28 11:52:22
Repository: bla
Actor: lemmy-
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/baby-loris/bla/pulls/comments/21027842","id":21027842,"diff_hunk":"@@ -115,10 +120,35 @@ var helloMethod = new ApiMethod({\n #### options\n List of available `options`:\n \n-| Name                | Type     | Description                                                         |\n-| ------------------- | -------- | ------------------------------------------------------------------- |\n-| showOnDocPage       | Boolean  | Show API method on the documentation page. Defaults to `true`.      |\n-| executeOnServerOnly | Boolean  | Permit to execute method only on server side . Defaults to `false`. |\n+| Name                 | Type              | Description                                                         |\n+| -------------------- | ----------------- | ------------------------------------------------------------------- |\n+| showOnDocPage        | Boolean           | Show API method on the documentation page. Defaults to `true`.      |\n+| executeOnServerOnly  | Boolean           | Permit to execute method only on server side. Defaults to `false`.  |\n+| paramsValidation     | String | Function | Preprocessing method parameters. Defaults to `normalize`.           |\n+\n+The option `paramsValidation` makes it possible to change default parameter preprocessing. `normalize` mode tries to convert each parameter value to its declared type if it is possible.\n+\n+Also you can implement your own `paramsValidation` function.\n+```javascript\n+var helloMethod = new ApiMethod({\n+    name: 'hello',\n+    params: {\n+        name: {type: 'String'}\n+    },\n+    options: {\n+        paramsValidation: function (paramValue, paramDeclaration) {\n+            return paramValue; // don't use validation at all\n+        }\n+    },\n+    action: function () {}\n+});\n+\n+```\n+where\n+  * `paramValue` — parameter value which should validate.","path":"REFERENCE.md","position":63,"original_position":63,"commit_id":"cc2fb1ceb7a0651fbd1ece5ad8830e12eac5cffc","original_commit_id":"cc2fb1ceb7a0651fbd1ece5ad8830e12eac5cffc","user":{"login":"lemmy-","id":5200135,"avatar_url":"https://avatars.githubusercontent.com/u/5200135?v=3","gravatar_id":"","url":"https://api.github.com/users/lemmy-","html_url":"https://github.com/lemmy-","followers_url":"https://api.github.com/users/lemmy-/followers","following_url":"https://api.github.com/users/lemmy-/following{/other_user}","gists_url":"https://api.github.com/users/lemmy-/gists{/gist_id}","starred_url":"https://api.github.com/users/lemmy-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemmy-/subscriptions","organizations_url":"https://api.github.com/users/lemmy-/orgs","repos_url":"https://api.github.com/users/lemmy-/repos","events_url":"https://api.github.com/users/lemmy-/events{/privacy}","received_events_url":"https://api.github.com/users/lemmy-/received_events","type":"User","site_admin":false},"body":"... should be validated ...","created_at":"2014-11-28T11:52:22Z","updated_at":"2014-11-28T11:52:22Z","html_url":"https://github.com/baby-loris/bla/pull/87#discussion_r21027842","pull_request_url":"https://api.github.com/repos/baby-loris/bla/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/baby-loris/bla/pulls/comments/21027842"},"html":{"href":"https://github.com/baby-loris/bla/pull/87#discussion_r21027842"},"pull_request":{"href":"https://api.github.com/repos/baby-loris/bla/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/baby-loris/bla/pulls/87","id":24902315,"html_url":"https://github.com/baby-loris/bla/pull/87","diff_url":"https://github.com/baby-loris/bla/pull/87.diff","patch_url":"https://github.com/baby-loris/bla/pull/87.patch","issue_url":"https://api.github.com/repos/baby-loris/bla/issues/87","number":87,"state":"open","locked":false,"title":"Custom validators for methods","user":{"login":"tarmolov","id":366419,"avatar_url":"https://avatars.githubusercontent.com/u/366419?v=3","gravatar_id":"","url":"https://api.github.com/users/tarmolov","html_url":"https://github.com/tarmolov","followers_url":"https://api.github.com/users/tarmolov/followers","following_url":"https://api.github.com/users/tarmolov/following{/other_user}","gists_url":"https://api.github.com/users/tarmolov/gists{/gist_id}","starred_url":"https://api.github.com/users/tarmolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarmolov/subscriptions","organizations_url":"https://api.github.com/users/tarmolov/orgs","repos_url":"https://api.github.com/users/tarmolov/repos","events_url":"https://api.github.com/users/tarmolov/events{/privacy}","received_events_url":"https://api.github.com/users/tarmolov/received_events","type":"User","site_admin":false},"body":"I want to keep current normalize system, @twoRoger wants a stricter system (#79). \r\nLet's think about validator mechanism in the library.\r\n\r\nDefault validation mode is `normalize` (current way to preprocess parameters). We can add an extra one — `strict`, for instance. Also a developer has a chance to declare just a custom function for this issue.\r\n\r\nThis option should be declared to each API method.\r\n\r\nOpinions? Cons/pros?","created_at":"2014-11-23T15:12:55Z","updated_at":"2014-11-28T11:52:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9ef2cb525faab85663172fc7f862c6160f0a953","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/baby-loris/bla/pulls/87/commits","review_comments_url":"https://api.github.com/repos/baby-loris/bla/pulls/87/comments","review_comment_url":"https://api.github.com/repos/baby-loris/bla/pulls/comments/{number}","comments_url":"https://api.github.com/repos/baby-loris/bla/issues/87/comments","statuses_url":"https://api.github.com/repos/baby-loris/bla/statuses/cc2fb1ceb7a0651fbd1ece5ad8830e12eac5cffc","head":{"label":"baby-loris:hevil.validator","ref":"hevil.validator","sha":"cc2fb1ceb7a0651fbd1ece5ad8830e12eac5cffc","user":{"login":"baby-loris","id":8769889,"avatar_url":"https://avatars.githubusercontent.com/u/8769889?v=3","gravatar_id":"","url":"https://api.github.com/users/baby-loris","html_url":"https://github.com/baby-loris","followers_url":"https://api.github.com/users/baby-loris/followers","following_url":"https://api.github.com/users/baby-loris/following{/other_user}","gists_url":"https://api.github.com/users/baby-loris/gists{/gist_id}","starred_url":"https://api.github.com/users/baby-loris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baby-loris/subscriptions","organizations_url":"https://api.github.com/users/baby-loris/orgs","repos_url":"https://api.github.com/users/baby-loris/repos","events_url":"https://api.github.com/users/baby-loris/events{/privacy}","received_events_url":"https://api.github.com/users/baby-loris/received_events","type":"Organization","site_admin":false},"repo":{"id":21876007,"name":"bla","full_name":"baby-loris/bla","owner":{"login":"baby-loris","id":8769889,"avatar_url":"https://avatars.githubusercontent.com/u/8769889?v=3","gravatar_id":"","url":"https://api.github.com/users/baby-loris","html_url":"https://github.com/baby-loris","followers_url":"https://api.github.com/users/baby-loris/followers","following_url":"https://api.github.com/users/baby-loris/following{/other_user}","gists_url":"https://api.github.com/users/baby-loris/gists{/gist_id}","starred_url":"https://api.github.com/users/baby-loris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baby-loris/subscriptions","organizations_url":"https://api.github.com/users/baby-loris/orgs","repos_url":"https://api.github.com/users/baby-loris/repos","events_url":"https://api.github.com/users/baby-loris/events{/privacy}","received_events_url":"https://api.github.com/users/baby-loris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baby-loris/bla","description":"Easy way to create your own API methods for server and client sides","fork":false,"url":"https://api.github.com/repos/baby-loris/bla","forks_url":"https://api.github.com/repos/baby-loris/bla/forks","keys_url":"https://api.github.com/repos/baby-loris/bla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baby-loris/bla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baby-loris/bla/teams","hooks_url":"https://api.github.com/repos/baby-loris/bla/hooks","issue_events_url":"https://api.github.com/repos/baby-loris/bla/issues/events{/number}","events_url":"https://api.github.com/repos/baby-loris/bla/events","assignees_url":"https://api.github.com/repos/baby-loris/bla/assignees{/user}","branches_url":"https://api.github.com/repos/baby-loris/bla/branches{/branch}","tags_url":"https://api.github.com/repos/baby-loris/bla/tags","blobs_url":"https://api.github.com/repos/baby-loris/bla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baby-loris/bla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baby-loris/bla/git/refs{/sha}","trees_url":"https://api.github.com/repos/baby-loris/bla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baby-loris/bla/statuses/{sha}","languages_url":"https://api.github.com/repos/baby-loris/bla/languages","stargazers_url":"https://api.github.com/repos/baby-loris/bla/stargazers","contributors_url":"https://api.github.com/repos/baby-loris/bla/contributors","subscribers_url":"https://api.github.com/repos/baby-loris/bla/subscribers","subscription_url":"https://api.github.com/repos/baby-loris/bla/subscription","commits_url":"https://api.github.com/repos/baby-loris/bla/commits{/sha}","git_commits_url":"https://api.github.com/repos/baby-loris/bla/git/commits{/sha}","comments_url":"https://api.github.com/repos/baby-loris/bla/comments{/number}","issue_comment_url":"https://api.github.com/repos/baby-loris/bla/issues/comments/{number}","contents_url":"https://api.github.com/repos/baby-loris/bla/contents/{+path}","compare_url":"https://api.github.com/repos/baby-loris/bla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baby-loris/bla/merges","archive_url":"https://api.github.com/repos/baby-loris/bla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baby-loris/bla/downloads","issues_url":"https://api.github.com/repos/baby-loris/bla/issues{/number}","pulls_url":"https://api.github.com/repos/baby-loris/bla/pulls{/number}","milestones_url":"https://api.github.com/repos/baby-loris/bla/milestones{/number}","notifications_url":"https://api.github.com/repos/baby-loris/bla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baby-loris/bla/labels{/name}","releases_url":"https://api.github.com/repos/baby-loris/bla/releases{/id}","created_at":"2014-07-15T21:09:57Z","updated_at":"2014-11-26T20:50:22Z","pushed_at":"2014-11-27T21:58:09Z","git_url":"git://github.com/baby-loris/bla.git","ssh_url":"git@github.com:baby-loris/bla.git","clone_url":"https://github.com/baby-loris/bla.git","svn_url":"https://github.com/baby-loris/bla","homepage":null,"size":2456,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":11,"default_branch":"master"}},"base":{"label":"baby-loris:master","ref":"master","sha":"589872aa23c5a89cd12862c1135e822d1bdb3dd1","user":{"login":"baby-loris","id":8769889,"avatar_url":"https://avatars.githubusercontent.com/u/8769889?v=3","gravatar_id":"","url":"https://api.github.com/users/baby-loris","html_url":"https://github.com/baby-loris","followers_url":"https://api.github.com/users/baby-loris/followers","following_url":"https://api.github.com/users/baby-loris/following{/other_user}","gists_url":"https://api.github.com/users/baby-loris/gists{/gist_id}","starred_url":"https://api.github.com/users/baby-loris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baby-loris/subscriptions","organizations_url":"https://api.github.com/users/baby-loris/orgs","repos_url":"https://api.github.com/users/baby-loris/repos","events_url":"https://api.github.com/users/baby-loris/events{/privacy}","received_events_url":"https://api.github.com/users/baby-loris/received_events","type":"Organization","site_admin":false},"repo":{"id":21876007,"name":"bla","full_name":"baby-loris/bla","owner":{"login":"baby-loris","id":8769889,"avatar_url":"https://avatars.githubusercontent.com/u/8769889?v=3","gravatar_id":"","url":"https://api.github.com/users/baby-loris","html_url":"https://github.com/baby-loris","followers_url":"https://api.github.com/users/baby-loris/followers","following_url":"https://api.github.com/users/baby-loris/following{/other_user}","gists_url":"https://api.github.com/users/baby-loris/gists{/gist_id}","starred_url":"https://api.github.com/users/baby-loris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baby-loris/subscriptions","organizations_url":"https://api.github.com/users/baby-loris/orgs","repos_url":"https://api.github.com/users/baby-loris/repos","events_url":"https://api.github.com/users/baby-loris/events{/privacy}","received_events_url":"https://api.github.com/users/baby-loris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baby-loris/bla","description":"Easy way to create your own API methods for server and client sides","fork":false,"url":"https://api.github.com/repos/baby-loris/bla","forks_url":"https://api.github.com/repos/baby-loris/bla/forks","keys_url":"https://api.github.com/repos/baby-loris/bla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baby-loris/bla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baby-loris/bla/teams","hooks_url":"https://api.github.com/repos/baby-loris/bla/hooks","issue_events_url":"https://api.github.com/repos/baby-loris/bla/issues/events{/number}","events_url":"https://api.github.com/repos/baby-loris/bla/events","assignees_url":"https://api.github.com/repos/baby-loris/bla/assignees{/user}","branches_url":"https://api.github.com/repos/baby-loris/bla/branches{/branch}","tags_url":"https://api.github.com/repos/baby-loris/bla/tags","blobs_url":"https://api.github.com/repos/baby-loris/bla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baby-loris/bla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baby-loris/bla/git/refs{/sha}","trees_url":"https://api.github.com/repos/baby-loris/bla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baby-loris/bla/statuses/{sha}","languages_url":"https://api.github.com/repos/baby-loris/bla/languages","stargazers_url":"https://api.github.com/repos/baby-loris/bla/stargazers","contributors_url":"https://api.github.com/repos/baby-loris/bla/contributors","subscribers_url":"https://api.github.com/repos/baby-loris/bla/subscribers","subscription_url":"https://api.github.com/repos/baby-loris/bla/subscription","commits_url":"https://api.github.com/repos/baby-loris/bla/commits{/sha}","git_commits_url":"https://api.github.com/repos/baby-loris/bla/git/commits{/sha}","comments_url":"https://api.github.com/repos/baby-loris/bla/comments{/number}","issue_comment_url":"https://api.github.com/repos/baby-loris/bla/issues/comments/{number}","contents_url":"https://api.github.com/repos/baby-loris/bla/contents/{+path}","compare_url":"https://api.github.com/repos/baby-loris/bla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baby-loris/bla/merges","archive_url":"https://api.github.com/repos/baby-loris/bla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baby-loris/bla/downloads","issues_url":"https://api.github.com/repos/baby-loris/bla/issues{/number}","pulls_url":"https://api.github.com/repos/baby-loris/bla/pulls{/number}","milestones_url":"https://api.github.com/repos/baby-loris/bla/milestones{/number}","notifications_url":"https://api.github.com/repos/baby-loris/bla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baby-loris/bla/labels{/name}","releases_url":"https://api.github.com/repos/baby-loris/bla/releases{/id}","created_at":"2014-07-15T21:09:57Z","updated_at":"2014-11-26T20:50:22Z","pushed_at":"2014-11-27T21:58:09Z","git_url":"git://github.com/baby-loris/bla.git","ssh_url":"git@github.com:baby-loris/bla.git","clone_url":"https://github.com/baby-loris/bla.git","svn_url":"https://github.com/baby-loris/bla","homepage":null,"size":2456,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baby-loris/bla/pulls/87"},"html":{"href":"https://github.com/baby-loris/bla/pull/87"},"issue":{"href":"https://api.github.com/repos/baby-loris/bla/issues/87"},"comments":{"href":"https://api.github.com/repos/baby-loris/bla/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/baby-loris/bla/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/baby-loris/bla/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/baby-loris/bla/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/baby-loris/bla/statuses/cc2fb1ceb7a0651fbd1ece5ad8830e12eac5cffc"}}}}