{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/comments/24426671","id":24426671,"diff_hunk":"@@ -0,0 +1,139 @@\n+{\n+  \"type\": \"object\",\n+  \"properties\": {\n+    \"show-by-default\": {\n+      \"type\": \"boolean\"\n+    },\n+    \"modes\": {\n+      \"type\": \"array\",\n+      \"items\": {\n+        \"type\": \"object\",\n+        \"properties\": {\n+          \"title\": {\n+            \"type\": \"string\"\n+          },\n+          \"orientation\": {\n+            \"enum\": [\"vertical\", \"horizontal\"]\n+          },\n+          \"images\": {\n+            \"type\": \"array\",\n+            \"items\": {\n+              \"$ref\": \"#/definitions/image\"\n+            }\n+          },\n+          \"page-rect\": {\n+            \"type\": \"object\",\n+            \"properties\": {\n+              \"left\": {\n+                \"type\": \"number\",\n+                \"minimum\": 0\n+              },\n+              \"top\": {\n+                \"type\": \"number\",\n+                \"minimum\": 0\n+              },\n+              \"width\": {\n+                \"type\": \"number\",\n+                \"minimum\": 0\n+              },\n+              \"height\": {\n+                \"type\": \"number\",\n+                \"minimum\": 0\n+              }\n+            },\n+            \"required\": [\"left\", \"top\", \"width\", \"height\"]\n+          }\n+        },\n+        \"required\": [\"title\", \"orientation\", \"images\", \"page-rect\"]\n+      }\n+    },\n+    \"title\": {\n+      \"type\": \"string\"\n+    },\n+    \"screen\": {\n+      \"type\": \"object\",\n+      \"properties\": {\n+        \"horizontal\": {\n+          \"$ref\": \"#/definitions/orientation\"\n+        },\n+        \"vertical\": {\n+          \"$ref\": \"#/definitions/orientation\"\n+        },\n+        \"device-pixel-ratio\": {\n+          \"type\": \"number\",\n+          \"minimum\": 0,\n+          \"maximum\": 100\n+        }\n+      },\n+      \"required\": [\"device-pixel-ratio\", \"vertical\", \"horizontal\"]\n+    },\n+    \"capabilities\": {\n+      \"type\": \"array\",\n+      \"items\": {\n+        \"enum\": [\"mobile\", \"touch\"]\n+      }\n+    },\n+    \"user-agent\": {\n+      \"type\": \"string\"\n+    },\n+    \"type\": {\n+      \"enum\": [\"phone\", \"tablet\", \"notebook\", \"desktop\", \"unknown\"]\n+    }\n+  },\n+  \"required\": [\"title\", \"type\", \"screen\", \"user-agent\", \"show-by-default\", \"capabilities\"],\n+  \"definitions\": {\n+    \"image\": {\n+      \"type\": \"object\",\n+      \"properties\": {\n+        \"src\": {\n+          \"type\": \"string\"\n+        },\n+        \"scale\": {\n+          \"type\": \"number\",\n+          \"minimum\": 0\n+        }\n+      },\n+      \"required\": [\"src\", \"scale\"]\n+    },\n+    \"orientation\": {\n+      \"type\": \"object\",\n+      \"properties\": {\n+        \"width\": {\n+          \"type\": \"number\",","path":"device_schema.json","position":102,"original_position":102,"commit_id":"bdc32216732e68c61f48d819036aae48f09f8c89","original_commit_id":"bdc32216732e68c61f48d819036aae48f09f8c89","user":{"login":"rrev","id":3382153,"avatar_url":"https://avatars.githubusercontent.com/u/3382153?v=3","gravatar_id":"","url":"https://api.github.com/users/rrev","html_url":"https://github.com/rrev","followers_url":"https://api.github.com/users/rrev/followers","following_url":"https://api.github.com/users/rrev/following{/other_user}","gists_url":"https://api.github.com/users/rrev/gists{/gist_id}","starred_url":"https://api.github.com/users/rrev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrev/subscriptions","organizations_url":"https://api.github.com/users/rrev/orgs","repos_url":"https://api.github.com/users/rrev/repos","events_url":"https://api.github.com/users/rrev/events{/privacy}","received_events_url":"https://api.github.com/users/rrev/received_events","type":"User","site_admin":false},"body":"Ok, I can use \"integer\" to disallow fractional numbers.\r\n\r\nI changed the width/height of orientation to `type: integer`. Now i'm looking for other places where fractional are disallowed","created_at":"2015-02-10T16:35:57Z","updated_at":"2015-02-10T16:35:57Z","html_url":"https://github.com/GoogleChrome/devtools-device-data/pull/11#discussion_r24426671","pull_request_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/comments/24426671"},"html":{"href":"https://github.com/GoogleChrome/devtools-device-data/pull/11#discussion_r24426671"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11","id":28952278,"html_url":"https://github.com/GoogleChrome/devtools-device-data/pull/11","diff_url":"https://github.com/GoogleChrome/devtools-device-data/pull/11.diff","patch_url":"https://github.com/GoogleChrome/devtools-device-data/pull/11.patch","issue_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues/11","number":11,"state":"open","locked":false,"title":"JSON file validation using JSON Schema file","user":{"login":"rrev","id":3382153,"avatar_url":"https://avatars.githubusercontent.com/u/3382153?v=3","gravatar_id":"","url":"https://api.github.com/users/rrev","html_url":"https://github.com/rrev","followers_url":"https://api.github.com/users/rrev/followers","following_url":"https://api.github.com/users/rrev/following{/other_user}","gists_url":"https://api.github.com/users/rrev/gists{/gist_id}","starred_url":"https://api.github.com/users/rrev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrev/subscriptions","organizations_url":"https://api.github.com/users/rrev/orgs","repos_url":"https://api.github.com/users/rrev/repos","events_url":"https://api.github.com/users/rrev/events{/privacy}","received_events_url":"https://api.github.com/users/rrev/received_events","type":"User","site_admin":false},"body":"See #9 \r\n\r\nI would like to edit this section\r\n\r\n```\r\n  if abs(d[\"width\"]) != d[\"width\"]:\r\n    raise_type_error(file_name, prefix + \"/width\", \"number\")\r\n\r\n  if abs(d[\"height\"]) != d[\"height\"]:\r\n    raise_type_error(file_name, prefix + \"/height\", \"number\")\r\n```\r\n\r\nby proving a more useful error message instead of a `Error: X should be of type Number` but I don't know what this code does.\r\n\r\nI throw away the entire python validation code (without changing the structure much -- but anyway, it's very clean) and created the schema file by reading the python code","created_at":"2015-02-09T20:11:37Z","updated_at":"2015-02-10T16:35:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cc686bd3a2ae047af4dfd0a1372484a1b1bbc5d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/comments/{number}","comments_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues/11/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/statuses/bdc32216732e68c61f48d819036aae48f09f8c89","head":{"label":"rrev:schema","ref":"schema","sha":"bdc32216732e68c61f48d819036aae48f09f8c89","user":{"login":"rrev","id":3382153,"avatar_url":"https://avatars.githubusercontent.com/u/3382153?v=3","gravatar_id":"","url":"https://api.github.com/users/rrev","html_url":"https://github.com/rrev","followers_url":"https://api.github.com/users/rrev/followers","following_url":"https://api.github.com/users/rrev/following{/other_user}","gists_url":"https://api.github.com/users/rrev/gists{/gist_id}","starred_url":"https://api.github.com/users/rrev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrev/subscriptions","organizations_url":"https://api.github.com/users/rrev/orgs","repos_url":"https://api.github.com/users/rrev/repos","events_url":"https://api.github.com/users/rrev/events{/privacy}","received_events_url":"https://api.github.com/users/rrev/received_events","type":"User","site_admin":false},"repo":{"id":30554538,"name":"devtools-device-data","full_name":"rrev/devtools-device-data","owner":{"login":"rrev","id":3382153,"avatar_url":"https://avatars.githubusercontent.com/u/3382153?v=3","gravatar_id":"","url":"https://api.github.com/users/rrev","html_url":"https://github.com/rrev","followers_url":"https://api.github.com/users/rrev/followers","following_url":"https://api.github.com/users/rrev/following{/other_user}","gists_url":"https://api.github.com/users/rrev/gists{/gist_id}","starred_url":"https://api.github.com/users/rrev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrev/subscriptions","organizations_url":"https://api.github.com/users/rrev/orgs","repos_url":"https://api.github.com/users/rrev/repos","events_url":"https://api.github.com/users/rrev/events{/privacy}","received_events_url":"https://api.github.com/users/rrev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rrev/devtools-device-data","description":"","fork":true,"url":"https://api.github.com/repos/rrev/devtools-device-data","forks_url":"https://api.github.com/repos/rrev/devtools-device-data/forks","keys_url":"https://api.github.com/repos/rrev/devtools-device-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rrev/devtools-device-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rrev/devtools-device-data/teams","hooks_url":"https://api.github.com/repos/rrev/devtools-device-data/hooks","issue_events_url":"https://api.github.com/repos/rrev/devtools-device-data/issues/events{/number}","events_url":"https://api.github.com/repos/rrev/devtools-device-data/events","assignees_url":"https://api.github.com/repos/rrev/devtools-device-data/assignees{/user}","branches_url":"https://api.github.com/repos/rrev/devtools-device-data/branches{/branch}","tags_url":"https://api.github.com/repos/rrev/devtools-device-data/tags","blobs_url":"https://api.github.com/repos/rrev/devtools-device-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rrev/devtools-device-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rrev/devtools-device-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/rrev/devtools-device-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rrev/devtools-device-data/statuses/{sha}","languages_url":"https://api.github.com/repos/rrev/devtools-device-data/languages","stargazers_url":"https://api.github.com/repos/rrev/devtools-device-data/stargazers","contributors_url":"https://api.github.com/repos/rrev/devtools-device-data/contributors","subscribers_url":"https://api.github.com/repos/rrev/devtools-device-data/subscribers","subscription_url":"https://api.github.com/repos/rrev/devtools-device-data/subscription","commits_url":"https://api.github.com/repos/rrev/devtools-device-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/rrev/devtools-device-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/rrev/devtools-device-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/rrev/devtools-device-data/issues/comments/{number}","contents_url":"https://api.github.com/repos/rrev/devtools-device-data/contents/{+path}","compare_url":"https://api.github.com/repos/rrev/devtools-device-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rrev/devtools-device-data/merges","archive_url":"https://api.github.com/repos/rrev/devtools-device-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rrev/devtools-device-data/downloads","issues_url":"https://api.github.com/repos/rrev/devtools-device-data/issues{/number}","pulls_url":"https://api.github.com/repos/rrev/devtools-device-data/pulls{/number}","milestones_url":"https://api.github.com/repos/rrev/devtools-device-data/milestones{/number}","notifications_url":"https://api.github.com/repos/rrev/devtools-device-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rrev/devtools-device-data/labels{/name}","releases_url":"https://api.github.com/repos/rrev/devtools-device-data/releases{/id}","created_at":"2015-02-09T19:40:04Z","updated_at":"2015-02-09T19:40:04Z","pushed_at":"2015-02-09T20:27:19Z","git_url":"git://github.com/rrev/devtools-device-data.git","ssh_url":"git@github.com:rrev/devtools-device-data.git","clone_url":"https://github.com/rrev/devtools-device-data.git","svn_url":"https://github.com/rrev/devtools-device-data","homepage":null,"size":363,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"fcc7b5a90f27ed429d66e0f2bb2df5b08d2ccb29","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":28062115,"name":"devtools-device-data","full_name":"GoogleChrome/devtools-device-data","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/devtools-device-data","description":"","fork":false,"url":"https://api.github.com/repos/GoogleChrome/devtools-device-data","forks_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/forks","keys_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/events","assignees_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues/comments/{number}","contents_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/merges","archive_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/devtools-device-data/releases{/id}","created_at":"2014-12-15T23:59:58Z","updated_at":"2015-02-10T16:16:40Z","pushed_at":"2015-02-09T14:46:36Z","git_url":"git://github.com/GoogleChrome/devtools-device-data.git","ssh_url":"git@github.com:GoogleChrome/devtools-device-data.git","clone_url":"https://github.com/GoogleChrome/devtools-device-data.git","svn_url":"https://github.com/GoogleChrome/devtools-device-data","homepage":null,"size":509,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11"},"html":{"href":"https://github.com/GoogleChrome/devtools-device-data/pull/11"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues/11"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/devtools-device-data/statuses/bdc32216732e68c61f48d819036aae48f09f8c89"}}}}