{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/81040257","pull_request_review_id":2050349,"id":81040257,"diff_hunk":"@@ -0,0 +1,116 @@\n+/*\n+Copyright 2016 The Kubernetes Authors.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package openapi\n+\n+import (\n+\t\"sort\"\n+\n+\t\"github.com/emicklei/go-restful\"\n+\t\"github.com/go-openapi/spec\"\n+)\n+\n+type parameters []spec.Parameter\n+\n+func (s parameters) Len() int      { return len(s) }\n+func (s parameters) Swap(i, j int) { s[i], s[j] = s[j], s[i] }\n+\n+// byNameIn used in sorting parameters by Name and In fields.\n+type byNameIn struct {\n+\tparameters\n+}\n+\n+func (s byNameIn) Less(i, j int) bool {","path":"pkg/genericapiserver/openapi/util.go","position":36,"original_position":36,"commit_id":"eb2790d8975b73310e23a384176242426cb920f1","original_commit_id":"8514f9198f1be3192b99207368b4d5c73ec96a18","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"nice use of struct composition.","created_at":"2016-09-28T23:38:24Z","updated_at":"2016-09-28T23:56:28Z","html_url":"https://github.com/kubernetes/kubernetes/pull/33628#discussion_r81040257","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/81040257"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/33628#discussion_r81040257"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628","id":87049619,"html_url":"https://github.com/kubernetes/kubernetes/pull/33628","diff_url":"https://github.com/kubernetes/kubernetes/pull/33628.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/33628.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33628","number":33628,"state":"open","locked":false,"title":"Add OpenAPI specs to source tree","user":{"login":"mbohlool","id":1613024,"avatar_url":"https://avatars.githubusercontent.com/u/1613024?v=3","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false},"body":"Similar to swagger spec, adding openapi specs in a separate folder api/openapi-spec\r\n\r\nTo make sure we generate a consistent spec, parameters need to be sorted first.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/33628)\n<!-- Reviewable:end -->\n","created_at":"2016-09-28T03:33:57Z","updated_at":"2016-09-28T23:56:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0837363bc58a47b241df4b2031e4d0ff733ae3a","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"assignees":[{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.5","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23/labels","id":1945978,"number":23,"title":"v1.5","description":"","creator":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"open_issues":213,"closed_issues":98,"state":"open","created_at":"2016-08-16T21:47:28Z","updated_at":"2016-09-28T23:28:33Z","due_on":"2016-12-09T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33628/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/eb2790d8975b73310e23a384176242426cb920f1","head":{"label":"mbohlool:co2","ref":"co2","sha":"eb2790d8975b73310e23a384176242426cb920f1","user":{"login":"mbohlool","id":1613024,"avatar_url":"https://avatars.githubusercontent.com/u/1613024?v=3","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false},"repo":{"id":58666689,"name":"kubernetes","full_name":"mbohlool/kubernetes","owner":{"login":"mbohlool","id":1613024,"avatar_url":"https://avatars.githubusercontent.com/u/1613024?v=3","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbohlool/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/mbohlool/kubernetes","forks_url":"https://api.github.com/repos/mbohlool/kubernetes/forks","keys_url":"https://api.github.com/repos/mbohlool/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbohlool/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbohlool/kubernetes/teams","hooks_url":"https://api.github.com/repos/mbohlool/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mbohlool/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mbohlool/kubernetes/events","assignees_url":"https://api.github.com/repos/mbohlool/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mbohlool/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mbohlool/kubernetes/tags","blobs_url":"https://api.github.com/repos/mbohlool/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbohlool/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbohlool/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbohlool/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbohlool/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mbohlool/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mbohlool/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mbohlool/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mbohlool/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mbohlool/kubernetes/subscription","commits_url":"https://api.github.com/repos/mbohlool/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbohlool/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbohlool/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbohlool/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbohlool/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mbohlool/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbohlool/kubernetes/merges","archive_url":"https://api.github.com/repos/mbohlool/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbohlool/kubernetes/downloads","issues_url":"https://api.github.com/repos/mbohlool/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mbohlool/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mbohlool/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mbohlool/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbohlool/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mbohlool/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/mbohlool/kubernetes/deployments","created_at":"2016-05-12T18:30:33Z","updated_at":"2016-05-12T18:30:48Z","pushed_at":"2016-09-28T06:56:26Z","git_url":"git://github.com/mbohlool/kubernetes.git","ssh_url":"git@github.com:mbohlool/kubernetes.git","clone_url":"https://github.com/mbohlool/kubernetes.git","svn_url":"https://github.com/mbohlool/kubernetes","homepage":"http://kubernetes.io","size":327781,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"kubernetes:master","ref":"master","sha":"2d881ca1e9d4b31f4af2c3e80c6d2fc2e2621f49","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-09-28T21:24:49Z","pushed_at":"2016-09-28T23:47:15Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":573196,"stargazers_count":17157,"watchers_count":17157,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5561,"mirror_url":null,"open_issues_count":4657,"forks":5561,"open_issues":4657,"watchers":17157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/33628"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/33628"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/33628/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33628/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/eb2790d8975b73310e23a384176242426cb920f1"}}}}
{"actor":{"display_login":"lavalamp"}}