{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/333","repository_url":"https://api.github.com/repos/alphagov/govuk-content-schemas","labels_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/333/comments","events_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/333/events","html_url":"https://github.com/alphagov/govuk-content-schemas/pull/333","id":161966401,"number":333,"title":"Add a message queue schema","user":{"login":"cbaines","id":1130010,"avatar_url":"https://avatars.githubusercontent.com/u/1130010?v=3","gravatar_id":"","url":"https://api.github.com/users/cbaines","html_url":"https://github.com/cbaines","followers_url":"https://api.github.com/users/cbaines/followers","following_url":"https://api.github.com/users/cbaines/following{/other_user}","gists_url":"https://api.github.com/users/cbaines/gists{/gist_id}","starred_url":"https://api.github.com/users/cbaines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbaines/subscriptions","organizations_url":"https://api.github.com/users/cbaines/orgs","repos_url":"https://api.github.com/users/cbaines/repos","events_url":"https://api.github.com/users/cbaines/events{/privacy}","received_events_url":"https://api.github.com/users/cbaines/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-23T16:28:52Z","updated_at":"2016-06-28T08:22:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk-content-schemas/pulls/333","html_url":"https://github.com/alphagov/govuk-content-schemas/pull/333","diff_url":"https://github.com/alphagov/govuk-content-schemas/pull/333.diff","patch_url":"https://github.com/alphagov/govuk-content-schemas/pull/333.patch"},"body":"Trello ticket: https://trello.com/c/teMFb0iD/734-content-schemas-for-content-on-message-queue\r\n\r\nThe publishing api sends JSON documents out on a \"message queue\". These JSON\r\ndocuments include a representation of a content item. This new schema aims to\r\ndescribe these JSON documents, as they are generated currently by the\r\npublishing api.\r\n\r\nThe schema should accept any current output of the publishing api, but is\r\nincomplete in many areas (e.g. loose validation for expanded_links), and so is\r\nnot very useful for consumers of the message queue in terms of documentation of\r\nwhat can be expected.\r\n\r\nOriginally I did set out to make a schema per format as is done for the\r\npublisher and frontend schemas, but ran in to issues with the behavior of the\r\nschema combiner, particularly with regard to the mutual exclusivity of the\r\nformat and document_type + schema_name fields as the message queue payload\r\nincludes all three. As a result of this, I switched to building a schema to\r\nmatch the message queue payload, for any format."},"comment":{"url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/comments/228983794","html_url":"https://github.com/alphagov/govuk-content-schemas/pull/333#issuecomment-228983794","issue_url":"https://api.github.com/repos/alphagov/govuk-content-schemas/issues/333","id":228983794,"user":{"login":"cbaines","id":1130010,"avatar_url":"https://avatars.githubusercontent.com/u/1130010?v=3","gravatar_id":"","url":"https://api.github.com/users/cbaines","html_url":"https://github.com/cbaines","followers_url":"https://api.github.com/users/cbaines/followers","following_url":"https://api.github.com/users/cbaines/following{/other_user}","gists_url":"https://api.github.com/users/cbaines/gists{/gist_id}","starred_url":"https://api.github.com/users/cbaines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbaines/subscriptions","organizations_url":"https://api.github.com/users/cbaines/orgs","repos_url":"https://api.github.com/users/cbaines/repos","events_url":"https://api.github.com/users/cbaines/events{/privacy}","received_events_url":"https://api.github.com/users/cbaines/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T08:22:12Z","updated_at":"2016-06-28T08:22:12Z","body":"> There are a bunch of tests for the different schema combiner tasks in eg spec/tasks and for the lib classes in spec/lib, I think the new code here could be tested there too.\r\n\r\nI have not thought about this much, but I think it would be more valuable to cover the task code indirectly, by having more example inputs, including invalid inputs. I think this would cover the task code indirectly, and give coverage of the input space, which is more valuable. What do you think?"}}
{"actor":{"display_login":"cbaines"}}