{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/issues/127","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/issues/127/comments","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/issues/127/events","html_url":"https://github.com/alphagov/digitalmarketplace-api/pull/127","id":77720593,"number":127,"title":"[#94850520] Fix bug updating g5 services","user":{"login":"robyoung","id":14287,"avatar_url":"https://avatars.githubusercontent.com/u/14287?v=3","gravatar_id":"","url":"https://api.github.com/users/robyoung","html_url":"https://github.com/robyoung","followers_url":"https://api.github.com/users/robyoung/followers","following_url":"https://api.github.com/users/robyoung/following{/other_user}","gists_url":"https://api.github.com/users/robyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/robyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robyoung/subscriptions","organizations_url":"https://api.github.com/users/robyoung/orgs","repos_url":"https://api.github.com/users/robyoung/repos","events_url":"https://api.github.com/users/robyoung/events{/privacy}","received_events_url":"https://api.github.com/users/robyoung/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T16:37:32Z","updated_at":"2015-05-18T16:38:47Z","closed_at":"2015-05-18T16:38:47Z","pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/pulls/127","html_url":"https://github.com/alphagov/digitalmarketplace-api/pull/127","diff_url":"https://github.com/alphagov/digitalmarketplace-api/pull/127.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-api/pull/127.patch"},"body":"https://www.pivotaltracker.com/story/show/94850520\r\n\r\n## Change update_service to validate whole service\r\nThe change validates the entire serialized service object (minus a small number of foreign fields) against the JSON schema rather than just what is stored in the `data` field. This makes the JSON schema a better reflection of what the HTTP API accepts and produces.\r\n\r\n## Make import_service more like update_service\r\nMove code around so that it flows more similarly to update_service.\r\n\r\nDissallow updates via PUT. All our updates currently go through POST and the import_service method already makes assumptions about it always creating new services (it always returns a 201 status code and always updates the created_at field).\r\n\r\nRemove some redundant tests that are either in the wrong place (testing post in the put test) or no longer necesarry (testing the search API is called on update through the PUT endpoint).\r\n\r\nEnsure supplierId does not make it into the data field, it is in the supplier_id field of the model."},"comment":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/issues/comments/103121590","html_url":"https://github.com/alphagov/digitalmarketplace-api/pull/127#issuecomment-103121590","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-api/issues/127","id":103121590,"user":{"login":"robyoung","id":14287,"avatar_url":"https://avatars.githubusercontent.com/u/14287?v=3","gravatar_id":"","url":"https://api.github.com/users/robyoung","html_url":"https://github.com/robyoung","followers_url":"https://api.github.com/users/robyoung/followers","following_url":"https://api.github.com/users/robyoung/following{/other_user}","gists_url":"https://api.github.com/users/robyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/robyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robyoung/subscriptions","organizations_url":"https://api.github.com/users/robyoung/orgs","repos_url":"https://api.github.com/users/robyoung/repos","events_url":"https://api.github.com/users/robyoung/events{/privacy}","received_events_url":"https://api.github.com/users/robyoung/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T16:38:47Z","updated_at":"2015-05-18T16:38:47Z","body":"Closing until I've verified the result with @andrewchong "}}