{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/repose/pulls/comments/66279108","id":66279108,"diff_hunk":"@@ -87,6 +86,19 @@ class OpenStackIdentityV3Handler(identityConfig: OpenstackIdentityV3Config, iden\n       response.addHeader(HttpHeaders.RETRY_AFTER, retry)\n     }\n \n+    implicit val catalogWrites = new Writes[ServiceForAuthenticationResponse] {\n+      def writes(catalog: ServiceForAuthenticationResponse) = JsObject(Seq(\n+        \"endpoints\" -> JsArray(catalog.endpoints.map(endpoint => JsObject(\n+          Seq(\"id\" -> JsString(endpoint.id)) ++\n+            endpoint.name.map(name => Seq(\"name\" -> JsString(name))).getOrElse(Seq()) ++\n+            endpoint.interface.map(interface => Seq(\"interface\" -> JsString(interface))).getOrElse(Seq()) ++\n+            endpoint.region.map(region => Seq(\"region\" -> JsString(region))).getOrElse(Seq()) ++\n+            Seq(\"url\" -> JsString(endpoint.url)) ++\n+            endpoint.service_id.map(serviceId => Seq(\"service_id\" -> JsString(serviceId))).getOrElse(Seq()))))) ++\n+        catalog.id.map(id => Seq(\"id\" -> JsString(id))).getOrElse(Seq()) ++\n+        catalog.name.map(name => Seq(\"name\" -> JsString(name))).getOrElse(Seq()))\n+    }","path":"repose-aggregator/components/filters/openstack-identity-v3-filter/src/main/scala/org/openrepose/filters/openstackidentityv3/OpenStackIdentityV3Handler.scala","position":28,"original_position":28,"commit_id":"70c346711aaa39ebd7fdaf6576b1a0ba45125b7e","original_commit_id":"70c346711aaa39ebd7fdaf6576b1a0ba45125b7e","user":{"login":"Mario-Lopez","id":6766560,"avatar_url":"https://avatars.githubusercontent.com/u/6766560?v=3","gravatar_id":"","url":"https://api.github.com/users/Mario-Lopez","html_url":"https://github.com/Mario-Lopez","followers_url":"https://api.github.com/users/Mario-Lopez/followers","following_url":"https://api.github.com/users/Mario-Lopez/following{/other_user}","gists_url":"https://api.github.com/users/Mario-Lopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Mario-Lopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mario-Lopez/subscriptions","organizations_url":"https://api.github.com/users/Mario-Lopez/orgs","repos_url":"https://api.github.com/users/Mario-Lopez/repos","events_url":"https://api.github.com/users/Mario-Lopez/events{/privacy}","received_events_url":"https://api.github.com/users/Mario-Lopez/received_events","type":"User","site_admin":false},"body":"Yup, this is one of the things I plan on changing.\r\n\r\n1. It's using the fancy implicit writes thing to be able to do `Json.toJson` later in the class.  I think I'm going to move the JSON construction down so it'll be closer to where it's being used and avoid using an implicit completely.  https://github.com/rackerlabs/repose/blob/70c346711aaa39ebd7fdaf6576b1a0ba45125b7e/repose-aggregator/components/filters/openstack-identity-v3-filter/src/main/scala/org/openrepose/filters/openstackidentityv3/OpenStackIdentityV3Handler.scala#L235\r\n\r\n2. It is using class construction.  I'm not sure what you mean???\r\n\r\n3. If you're talking about the `Seq()`, the alternative doesn't look that great:\r\n`Seq.empty[(String, JsValue)]`\r\n\r\n4. When using JsObject(Seq(...)), there is no automatic conversion from String to JsString.  It must be specified.\r\n\r\n4a. I'm using JsObject(Seq(...)) over Json.obj(...) since (in order to maintain the old behavior which may be something we don't need to do) I need to be able to leave out fields if they're going to be null.  It's still possible to do it using Json.obj(...), but it looks messier.\r\n\r\n5. Yeah, I planned on fixing indentation issues like that.","created_at":"2016-06-08T15:33:11Z","updated_at":"2016-06-08T15:33:11Z","html_url":"https://github.com/rackerlabs/repose/pull/1550#discussion_r66279108","pull_request_url":"https://api.github.com/repos/rackerlabs/repose/pulls/1550","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/comments/66279108"},"html":{"href":"https://github.com/rackerlabs/repose/pull/1550#discussion_r66279108"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1550"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/repose/pulls/1550","id":72967758,"html_url":"https://github.com/rackerlabs/repose/pull/1550","diff_url":"https://github.com/rackerlabs/repose/pull/1550.diff","patch_url":"https://github.com/rackerlabs/repose/pull/1550.patch","issue_url":"https://api.github.com/repos/rackerlabs/repose/issues/1550","number":1550,"state":"open","locked":false,"title":"REP-999 - Identity v3 json pathing - NOT READY","user":{"login":"Mario-Lopez","id":6766560,"avatar_url":"https://avatars.githubusercontent.com/u/6766560?v=3","gravatar_id":"","url":"https://api.github.com/users/Mario-Lopez","html_url":"https://github.com/Mario-Lopez","followers_url":"https://api.github.com/users/Mario-Lopez/followers","following_url":"https://api.github.com/users/Mario-Lopez/following{/other_user}","gists_url":"https://api.github.com/users/Mario-Lopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Mario-Lopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mario-Lopez/subscriptions","organizations_url":"https://api.github.com/users/Mario-Lopez/orgs","repos_url":"https://api.github.com/users/Mario-Lopez/repos","events_url":"https://api.github.com/users/Mario-Lopez/events{/privacy}","received_events_url":"https://api.github.com/users/Mario-Lopez/received_events","type":"User","site_admin":false},"body":"The code is a hot mess right now, so it's not worth looking at just yet.  I need to see if the functional tests still pass, though.","created_at":"2016-06-07T23:57:28Z","updated_at":"2016-06-08T15:33:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19d32f1a5c502ef0ff61cde942018be5477fae1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/repose/pulls/1550/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/repose/pulls/1550/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/repose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/repose/issues/1550/comments","statuses_url":"https://api.github.com/repos/rackerlabs/repose/statuses/70c346711aaa39ebd7fdaf6576b1a0ba45125b7e","head":{"label":"rackerlabs:REP-999-Identity-v3-json-pathing","ref":"REP-999-Identity-v3-json-pathing","sha":"70c346711aaa39ebd7fdaf6576b1a0ba45125b7e","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1981821,"name":"repose","full_name":"rackerlabs/repose","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/repose","description":"The powerful, programmable, API Middleware Platform","fork":false,"url":"https://api.github.com/repos/rackerlabs/repose","forks_url":"https://api.github.com/repos/rackerlabs/repose/forks","keys_url":"https://api.github.com/repos/rackerlabs/repose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/repose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/repose/teams","hooks_url":"https://api.github.com/repos/rackerlabs/repose/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/repose/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/repose/events","assignees_url":"https://api.github.com/repos/rackerlabs/repose/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/repose/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/repose/tags","blobs_url":"https://api.github.com/repos/rackerlabs/repose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/repose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/repose/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/repose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/repose/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/repose/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/repose/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/repose/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/repose/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/repose/subscription","commits_url":"https://api.github.com/repos/rackerlabs/repose/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/repose/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/repose/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/repose/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/repose/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/repose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/repose/merges","archive_url":"https://api.github.com/repos/rackerlabs/repose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/repose/downloads","issues_url":"https://api.github.com/repos/rackerlabs/repose/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/repose/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/repose/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/repose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/repose/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/repose/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/repose/deployments","created_at":"2011-07-01T04:39:34Z","updated_at":"2016-05-27T12:26:26Z","pushed_at":"2016-06-08T14:26:16Z","git_url":"git://github.com/rackerlabs/repose.git","ssh_url":"git@github.com:rackerlabs/repose.git","clone_url":"https://github.com/rackerlabs/repose.git","svn_url":"https://github.com/rackerlabs/repose","homepage":"http://www.openrepose.org/","size":103074,"stargazers_count":246,"watchers_count":246,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":7,"forks":73,"open_issues":7,"watchers":246,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"952ba88aa6ee0c5ceb4a2063e49085e8656f35be","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1981821,"name":"repose","full_name":"rackerlabs/repose","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/repose","description":"The powerful, programmable, API Middleware Platform","fork":false,"url":"https://api.github.com/repos/rackerlabs/repose","forks_url":"https://api.github.com/repos/rackerlabs/repose/forks","keys_url":"https://api.github.com/repos/rackerlabs/repose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/repose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/repose/teams","hooks_url":"https://api.github.com/repos/rackerlabs/repose/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/repose/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/repose/events","assignees_url":"https://api.github.com/repos/rackerlabs/repose/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/repose/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/repose/tags","blobs_url":"https://api.github.com/repos/rackerlabs/repose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/repose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/repose/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/repose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/repose/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/repose/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/repose/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/repose/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/repose/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/repose/subscription","commits_url":"https://api.github.com/repos/rackerlabs/repose/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/repose/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/repose/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/repose/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/repose/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/repose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/repose/merges","archive_url":"https://api.github.com/repos/rackerlabs/repose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/repose/downloads","issues_url":"https://api.github.com/repos/rackerlabs/repose/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/repose/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/repose/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/repose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/repose/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/repose/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/repose/deployments","created_at":"2011-07-01T04:39:34Z","updated_at":"2016-05-27T12:26:26Z","pushed_at":"2016-06-08T14:26:16Z","git_url":"git://github.com/rackerlabs/repose.git","ssh_url":"git@github.com:rackerlabs/repose.git","clone_url":"https://github.com/rackerlabs/repose.git","svn_url":"https://github.com/rackerlabs/repose","homepage":"http://www.openrepose.org/","size":103074,"stargazers_count":246,"watchers_count":246,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":7,"forks":73,"open_issues":7,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1550"},"html":{"href":"https://github.com/rackerlabs/repose/pull/1550"},"issue":{"href":"https://api.github.com/repos/rackerlabs/repose/issues/1550"},"comments":{"href":"https://api.github.com/repos/rackerlabs/repose/issues/1550/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1550/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1550/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/repose/statuses/70c346711aaa39ebd7fdaf6576b1a0ba45125b7e"}}}}
{"actor":{"display_login":"Mario-Lopez"}}