{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/comments/28408012","id":28408012,"diff_hunk":"@@ -3,40 +3,40 @@ def initialize(user: , application:)\n     @user, @application = user, application\n   end\n \n-  def serialize\n-    {\n-      user: serialized_user,\n-      profile: serialized_profile,\n-      roles: serialized_roles,\n-    }\n-  end\n-\n-  def to_json(opts = {})\n-    serialize.to_json opts\n+  def as_json(opts = {})\n+    serialize\n   end\n \n   private\n \n   attr_reader :user, :application\n \n+  def serialize\n+    {\n+      \"user\" => serialized_user,\n+      \"profile\" => serialized_profile,\n+      \"roles\" => serialized_roles,\n+    }\n+  end\n+\n   def serialized_user\n     {\n-      email: user.email,\n+      \"email\" => user.email,\n     }\n   end\n \n   def serialized_profile\n     {\n-      email: profile.email,\n-      name:  profile.name,\n-      telephone: profile.tel,\n-      mobile: profile.mobile,\n-      address: {\n-        full_address: profile.address,\n-        postcode: profile.postcode,\n+      \"email\" => profile.email,","path":"app/serializers/credentials_serializer.rb","position":46,"original_position":46,"commit_id":"47f1c25443c40f9992cf6bec34dd5d3987aeaf65","original_commit_id":"47f1c25443c40f9992cf6bec34dd5d3987aeaf65","user":{"login":"robmckinnon","id":3447,"avatar_url":"https://avatars.githubusercontent.com/u/3447?v=3","gravatar_id":"","url":"https://api.github.com/users/robmckinnon","html_url":"https://github.com/robmckinnon","followers_url":"https://api.github.com/users/robmckinnon/followers","following_url":"https://api.github.com/users/robmckinnon/following{/other_user}","gists_url":"https://api.github.com/users/robmckinnon/gists{/gist_id}","starred_url":"https://api.github.com/users/robmckinnon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmckinnon/subscriptions","organizations_url":"https://api.github.com/users/robmckinnon/orgs","repos_url":"https://api.github.com/users/robmckinnon/repos","events_url":"https://api.github.com/users/robmckinnon/events{/privacy}","received_events_url":"https://api.github.com/users/robmckinnon/received_events","type":"User","site_admin":false},"body":"Is there a reason we're changing back to old hash syntax?\r\n\r\nI think the preference across MOJ has been to use the new Hash syntax when possible.  If you need to convert keys when writing specs, it's possible to use `symbolize_keys()`: http://api.rubyonrails.org/classes/Hash.html#method-i-symbolize_keys","created_at":"2015-04-15T10:14:31Z","updated_at":"2015-04-15T10:14:31Z","html_url":"https://github.com/ministryofjustice/defence-request-service-auth/pull/42#discussion_r28408012","pull_request_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/comments/28408012"},"html":{"href":"https://github.com/ministryofjustice/defence-request-service-auth/pull/42#discussion_r28408012"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42","id":33339230,"html_url":"https://github.com/ministryofjustice/defence-request-service-auth/pull/42","diff_url":"https://github.com/ministryofjustice/defence-request-service-auth/pull/42.diff","patch_url":"https://github.com/ministryofjustice/defence-request-service-auth/pull/42.patch","issue_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/42","number":42,"state":"open","locked":false,"title":"Profile API endpoints","user":{"login":"chriscarter90","id":1398210,"avatar_url":"https://avatars.githubusercontent.com/u/1398210?v=3","gravatar_id":"","url":"https://api.github.com/users/chriscarter90","html_url":"https://github.com/chriscarter90","followers_url":"https://api.github.com/users/chriscarter90/followers","following_url":"https://api.github.com/users/chriscarter90/following{/other_user}","gists_url":"https://api.github.com/users/chriscarter90/gists{/gist_id}","starred_url":"https://api.github.com/users/chriscarter90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriscarter90/subscriptions","organizations_url":"https://api.github.com/users/chriscarter90/orgs","repos_url":"https://api.github.com/users/chriscarter90/repos","events_url":"https://api.github.com/users/chriscarter90/events{/privacy}","received_events_url":"https://api.github.com/users/chriscarter90/received_events","type":"User","site_admin":false},"body":"* Adds the `/api/v1/profiles/:uid` endpoint for retrieving the details of one particular profile\r\n* Adds the `api/v1/profiles` endpoint for retrieving the details of many profiles, with an option `uids` parameter used for filtering\r\n\r\n**TBC**: Need confirmation from @ansonK that the latter endpoint will also require filtering by type with another optional `types` parameter","created_at":"2015-04-15T09:58:44Z","updated_at":"2015-04-15T10:14:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f575276cccf7bec7f9db6b912f3fc5611825be21","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/42/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/statuses/47f1c25443c40f9992cf6bec34dd5d3987aeaf65","head":{"label":"ministryofjustice:profile-api-endpoints","ref":"profile-api-endpoints","sha":"47f1c25443c40f9992cf6bec34dd5d3987aeaf65","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":32030127,"name":"defence-request-service-auth","full_name":"ministryofjustice/defence-request-service-auth","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/defence-request-service-auth","description":"DSDS - Defence Solicitor Request Service - Directory Service","fork":false,"url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth","forks_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/forks","keys_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/events","assignees_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/merges","archive_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/releases{/id}","created_at":"2015-03-11T17:03:26Z","updated_at":"2015-04-15T10:07:17Z","pushed_at":"2015-04-15T10:08:06Z","git_url":"git://github.com/ministryofjustice/defence-request-service-auth.git","ssh_url":"git@github.com:ministryofjustice/defence-request-service-auth.git","clone_url":"https://github.com/ministryofjustice/defence-request-service-auth.git","svn_url":"https://github.com/ministryofjustice/defence-request-service-auth","homepage":"","size":1016,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"4e1b9b6c087ce7c1770b858c88cdff45efb9af09","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":32030127,"name":"defence-request-service-auth","full_name":"ministryofjustice/defence-request-service-auth","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/defence-request-service-auth","description":"DSDS - Defence Solicitor Request Service - Directory Service","fork":false,"url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth","forks_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/forks","keys_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/events","assignees_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/merges","archive_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/releases{/id}","created_at":"2015-03-11T17:03:26Z","updated_at":"2015-04-15T10:07:17Z","pushed_at":"2015-04-15T10:08:06Z","git_url":"git://github.com/ministryofjustice/defence-request-service-auth.git","ssh_url":"git@github.com:ministryofjustice/defence-request-service-auth.git","clone_url":"https://github.com/ministryofjustice/defence-request-service-auth.git","svn_url":"https://github.com/ministryofjustice/defence-request-service-auth","homepage":"","size":1016,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42"},"html":{"href":"https://github.com/ministryofjustice/defence-request-service-auth/pull/42"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/42"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/defence-request-service-auth/statuses/47f1c25443c40f9992cf6bec34dd5d3987aeaf65"}}}}