{"action":"created","comment":{"url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/comments/174543262","pull_request_review_id":103914025,"id":174543262,"diff_hunk":"@@ -17,8 +17,32 @@ paths:\n       parameters: []\n       responses:\n         200:\n-          description: \"Facets.\"\n+          description: \"Success\"\n           schema:\n-            type: \"string\"\n+            $ref: \"#/definitions/FacetsResponse\"\n       x-swagger-router-controller: \"data_explorer.controllers.facets_controller\"\n-definitions: {}\n+definitions:\n+  FacetsResponse:","path":"api/data_explorer/swagger/swagger.yaml","position":12,"original_position":12,"commit_id":"1dced30ee2e5102330676fe7d373ad3b1e701c45","original_commit_id":"1dced30ee2e5102330676fe7d373ad3b1e701c45","user":{"login":"alahwa","id":6598882,"avatar_url":"https://avatars0.githubusercontent.com/u/6598882?v=4","gravatar_id":"","url":"https://api.github.com/users/alahwa","html_url":"https://github.com/alahwa","followers_url":"https://api.github.com/users/alahwa/followers","following_url":"https://api.github.com/users/alahwa/following{/other_user}","gists_url":"https://api.github.com/users/alahwa/gists{/gist_id}","starred_url":"https://api.github.com/users/alahwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alahwa/subscriptions","organizations_url":"https://api.github.com/users/alahwa/orgs","repos_url":"https://api.github.com/users/alahwa/repos","events_url":"https://api.github.com/users/alahwa/events{/privacy}","received_events_url":"https://api.github.com/users/alahwa/received_events","type":"User","site_admin":false},"body":"This definition is a bit redundant. I'm not an expert on API definition but consider removing this and then changing the /facets 200 response to something like:\r\n\r\n```\r\ndescription: \"Success\"\r\nschema:\r\n  type: array\r\n  items:\r\n    $ref: \"#/definitions/Facet\"\r\n```","created_at":"2018-03-14T17:25:04Z","updated_at":"2018-03-14T18:03:40Z","html_url":"https://github.com/DataBiosphere/data-explorer/pull/21#discussion_r174543262","pull_request_url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/comments/174543262"},"html":{"href":"https://github.com/DataBiosphere/data-explorer/pull/21#discussion_r174543262"},"pull_request":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21","id":174823878,"html_url":"https://github.com/DataBiosphere/data-explorer/pull/21","diff_url":"https://github.com/DataBiosphere/data-explorer/pull/21.diff","patch_url":"https://github.com/DataBiosphere/data-explorer/pull/21.patch","issue_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/21","number":21,"state":"open","locked":false,"title":"Have API server query Elasticsearch and return facets","user":{"login":"melissachang","id":10929390,"avatar_url":"https://avatars1.githubusercontent.com/u/10929390?v=4","gravatar_id":"","url":"https://api.github.com/users/melissachang","html_url":"https://github.com/melissachang","followers_url":"https://api.github.com/users/melissachang/followers","following_url":"https://api.github.com/users/melissachang/following{/other_user}","gists_url":"https://api.github.com/users/melissachang/gists{/gist_id}","starred_url":"https://api.github.com/users/melissachang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melissachang/subscriptions","organizations_url":"https://api.github.com/users/melissachang/orgs","repos_url":"https://api.github.com/users/melissachang/repos","events_url":"https://api.github.com/users/melissachang/events{/privacy}","received_events_url":"https://api.github.com/users/melissachang/received_events","type":"User","site_admin":false},"body":"Unlike Boardwalk, I'm using the FacetedSearch library (https://elasticsearch-dsl.readthedocs.io/en/latest/faceted_search.html). This simplifies client code. We'll see if this library works out.\r\n\r\nTested: http://localhost:8390/api/facets works\r\n\r\n\r\n","created_at":"2018-03-14T00:14:23Z","updated_at":"2018-03-14T18:03:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d157a633c4293c9b2a835481e2b3af1d5f11d23","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21/commits","review_comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21/comments","review_comment_url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/21/comments","statuses_url":"https://api.github.com/repos/DataBiosphere/data-explorer/statuses/1dced30ee2e5102330676fe7d373ad3b1e701c45","head":{"label":"DataBiosphere:mc/api-elasticsearch","ref":"mc/api-elasticsearch","sha":"1dced30ee2e5102330676fe7d373ad3b1e701c45","user":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":119908069,"name":"data-explorer","full_name":"DataBiosphere/data-explorer","owner":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataBiosphere/data-explorer","description":null,"fork":false,"url":"https://api.github.com/repos/DataBiosphere/data-explorer","forks_url":"https://api.github.com/repos/DataBiosphere/data-explorer/forks","keys_url":"https://api.github.com/repos/DataBiosphere/data-explorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/data-explorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/data-explorer/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/data-explorer/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/data-explorer/events","assignees_url":"https://api.github.com/repos/DataBiosphere/data-explorer/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/data-explorer/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/data-explorer/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/data-explorer/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/data-explorer/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/data-explorer/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/data-explorer/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/data-explorer/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/data-explorer/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/data-explorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/data-explorer/merges","archive_url":"https://api.github.com/repos/DataBiosphere/data-explorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/data-explorer/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/data-explorer/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/data-explorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/data-explorer/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/data-explorer/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/data-explorer/deployments","created_at":"2018-02-01T23:53:44Z","updated_at":"2018-03-14T02:39:48Z","pushed_at":"2018-03-14T00:15:09Z","git_url":"git://github.com/DataBiosphere/data-explorer.git","ssh_url":"git@github.com:DataBiosphere/data-explorer.git","clone_url":"https://github.com/DataBiosphere/data-explorer.git","svn_url":"https://github.com/DataBiosphere/data-explorer","homepage":null,"size":129,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":12,"watchers":1,"default_branch":"master"}},"base":{"label":"DataBiosphere:master","ref":"master","sha":"77d821e6d6c17676bbe27bcfa7cf349c239ba6b7","user":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":119908069,"name":"data-explorer","full_name":"DataBiosphere/data-explorer","owner":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataBiosphere/data-explorer","description":null,"fork":false,"url":"https://api.github.com/repos/DataBiosphere/data-explorer","forks_url":"https://api.github.com/repos/DataBiosphere/data-explorer/forks","keys_url":"https://api.github.com/repos/DataBiosphere/data-explorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/data-explorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/data-explorer/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/data-explorer/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/data-explorer/events","assignees_url":"https://api.github.com/repos/DataBiosphere/data-explorer/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/data-explorer/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/data-explorer/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/data-explorer/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/data-explorer/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/data-explorer/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/data-explorer/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/data-explorer/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/data-explorer/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/data-explorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/data-explorer/merges","archive_url":"https://api.github.com/repos/DataBiosphere/data-explorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/data-explorer/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/data-explorer/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/data-explorer/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/data-explorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/data-explorer/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/data-explorer/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/data-explorer/deployments","created_at":"2018-02-01T23:53:44Z","updated_at":"2018-03-14T02:39:48Z","pushed_at":"2018-03-14T00:15:09Z","git_url":"git://github.com/DataBiosphere/data-explorer.git","ssh_url":"git@github.com:DataBiosphere/data-explorer.git","clone_url":"https://github.com/DataBiosphere/data-explorer.git","svn_url":"https://github.com/DataBiosphere/data-explorer","homepage":null,"size":129,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21"},"html":{"href":"https://github.com/DataBiosphere/data-explorer/pull/21"},"issue":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/21"},"comments":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer/statuses/1dced30ee2e5102330676fe7d373ad3b1e701c45"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alahwa"}}