{"action":"closed","number":394,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/394","id":86211492,"html_url":"https://github.com/alphagov/govuk-content-schemas/pull/394","diff_url":"https://github.com/alphagov/govuk-content-schemas/pull/394.diff","patch_url":"https://github.com/alphagov/govuk-content-schemas/pull/394.patch","issue_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/394","number":394,"state":"closed","locked":false,"title":"Generate notification schemas","user":{"login":"tijmenb","id":233676,"avatar_url":"https://avatars.githubusercontent.com/u/233676?v=3","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"body":"Currently this repo has two versions of a schema: a \"frontend\" version that describes the output of the content-store, and a \"publisher\" schema which describes the JSON clients are sending to the publishing-api. This PR adds a third \"notification\" variant, which describes the payload that's being sent over the message queue. Adding this was the original plan when the contract testing was first conceived, but it was somehow never implemented. \r\n\r\nIn https://github.com/alphagov/govuk-content-schemas/pull/333, there was an attempt to add a generic schema that would describe all possible payloads. This was never used in the publishing-api and validation against it turned out to be quite complex because of the errors. The schemas have recently been simplified (https://github.com/alphagov/govuk-content-schemas/pull/374 https://github.com/alphagov/govuk-content-schemas/pull/378), which makes adding a schema per-format easier. \r\n\r\nThe new schemas can be used to validate the message queue payload and to generate random data in queue-consuming applications. In particular, we will use it in the publishing-api to make sure there are no unexpected changes to the payload. \r\n\r\nThe first commit is the most relevant to review. \r\n\r\nPart of: https://trello.com/c/fCvwqU5b","created_at":"2016-09-21T17:59:25Z","updated_at":"2016-09-22T09:43:47Z","closed_at":"2016-09-22T09:43:46Z","merged_at":"2016-09-22T09:43:46Z","merge_commit_sha":"71e123309975d61e9040e79d483c1064dfc765fd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/394/commits","review_comments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/394/comments","review_comment_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/394/comments","statuses_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/statuses/1b5c773b8263d60b41c7529c859b316e7b96810b","head":{"label":"alphagov:add-notification-schema","ref":"add-notification-schema","sha":"1b5c773b8263d60b41c7529c859b316e7b96810b","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":27441121,"name":"govuk-content-schemas","full_name":"alphagov/govuk-content-schemas","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk-content-schemas","description":"Definitions of the data formats used to represent content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/govuk-content-schemas","forks_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/forks","keys_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/events","assignees_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/merges","archive_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/deployments","created_at":"2014-12-02T16:20:33Z","updated_at":"2016-05-12T14:02:08Z","pushed_at":"2016-09-22T09:43:46Z","git_url":"git://github.com/alphagov/govuk-content-schemas.git","ssh_url":"git@github.com:alphagov/govuk-content-schemas.git","clone_url":"https://github.com/alphagov/govuk-content-schemas.git","svn_url":"https://github.com/alphagov/govuk-content-schemas","homepage":null,"size":3386,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"5c52025a958baa7d90a82b7a8f05312ce5b1a9e0","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":27441121,"name":"govuk-content-schemas","full_name":"alphagov/govuk-content-schemas","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk-content-schemas","description":"Definitions of the data formats used to represent content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/govuk-content-schemas","forks_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/forks","keys_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/events","assignees_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/merges","archive_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/deployments","created_at":"2014-12-02T16:20:33Z","updated_at":"2016-05-12T14:02:08Z","pushed_at":"2016-09-22T09:43:46Z","git_url":"git://github.com/alphagov/govuk-content-schemas.git","ssh_url":"git@github.com:alphagov/govuk-content-schemas.git","clone_url":"https://github.com/alphagov/govuk-content-schemas.git","svn_url":"https://github.com/alphagov/govuk-content-schemas","homepage":null,"size":3386,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/394"},"html":{"href":"https://github.com/alphagov/govuk-content-schemas/pull/394"},"issue":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/394"},"comments":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/394/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/394/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/394/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govuk-content-schemas/statuses/1b5c773b8263d60b41c7529c859b316e7b96810b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tijmenb","id":233676,"avatar_url":"https://avatars.githubusercontent.com/u/233676?v=3","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":2,"additions":19439,"deletions":4,"changed_files":40}}
{"actor":{"display_login":"tijmenb"}}