{"action":"created","issue":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/3433","repository_url":"https://api.github.com/repos/IQSS/dataverse","labels_url":"https://api.github.com/repos/IQSS/dataverse/issues/3433/labels{/name}","comments_url":"https://api.github.com/repos/IQSS/dataverse/issues/3433/comments","events_url":"https://api.github.com/repos/IQSS/dataverse/issues/3433/events","html_url":"https://github.com/IQSS/dataverse/pull/3433","id":185492038,"number":3433,"title":"API consistency: OK, response only has \"data\", remove okResponseGsonObject","user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"labels":[{"id":112723914,"url":"https://api.github.com/repos/IQSS/dataverse/labels/Component:%20API","name":"Component: API","color":"c7def8","default":false},{"id":159182477,"url":"https://api.github.com/repos/IQSS/dataverse/labels/Component:%20Code%20Infrastructure","name":"Component: Code Infrastructure","color":"c7def8","default":false},{"id":435707518,"url":"https://api.github.com/repos/IQSS/dataverse/labels/Status:%20Code%20Review","name":"Status: Code Review","color":"e6e6e6","default":false}],"state":"closed","locked":false,"assignee":{"login":"raprasad","id":1036060,"avatar_url":"https://avatars.githubusercontent.com/u/1036060?v=3","gravatar_id":"","url":"https://api.github.com/users/raprasad","html_url":"https://github.com/raprasad","followers_url":"https://api.github.com/users/raprasad/followers","following_url":"https://api.github.com/users/raprasad/following{/other_user}","gists_url":"https://api.github.com/users/raprasad/gists{/gist_id}","starred_url":"https://api.github.com/users/raprasad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raprasad/subscriptions","organizations_url":"https://api.github.com/users/raprasad/orgs","repos_url":"https://api.github.com/users/raprasad/repos","events_url":"https://api.github.com/users/raprasad/events{/privacy}","received_events_url":"https://api.github.com/users/raprasad/received_events","type":"User","site_admin":false},"assignees":[{"login":"raprasad","id":1036060,"avatar_url":"https://avatars.githubusercontent.com/u/1036060?v=3","gravatar_id":"","url":"https://api.github.com/users/raprasad","html_url":"https://github.com/raprasad","followers_url":"https://api.github.com/users/raprasad/followers","following_url":"https://api.github.com/users/raprasad/following{/other_user}","gists_url":"https://api.github.com/users/raprasad/gists{/gist_id}","starred_url":"https://api.github.com/users/raprasad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raprasad/subscriptions","organizations_url":"https://api.github.com/users/raprasad/orgs","repos_url":"https://api.github.com/users/raprasad/repos","events_url":"https://api.github.com/users/raprasad/events{/privacy}","received_events_url":"https://api.github.com/users/raprasad/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/IQSS/dataverse/milestones/54","html_url":"https://github.com/IQSS/dataverse/milestones/4.6%20-%20File%20Replace","labels_url":"https://api.github.com/repos/IQSS/dataverse/milestones/54/labels","id":1872342,"number":54,"title":"4.6 - File Replace","description":"File Replace will allow users to replace an existing dataset file with a new version. Users will also be able to view and download previous versions of the file.\r\n\r\n","creator":{"login":"djbrooke","id":7773392,"avatar_url":"https://avatars.githubusercontent.com/u/7773392?v=3","gravatar_id":"","url":"https://api.github.com/users/djbrooke","html_url":"https://github.com/djbrooke","followers_url":"https://api.github.com/users/djbrooke/followers","following_url":"https://api.github.com/users/djbrooke/following{/other_user}","gists_url":"https://api.github.com/users/djbrooke/gists{/gist_id}","starred_url":"https://api.github.com/users/djbrooke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djbrooke/subscriptions","organizations_url":"https://api.github.com/users/djbrooke/orgs","repos_url":"https://api.github.com/users/djbrooke/repos","events_url":"https://api.github.com/users/djbrooke/events{/privacy}","received_events_url":"https://api.github.com/users/djbrooke/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":14,"state":"open","created_at":"2016-07-08T14:55:00Z","updated_at":"2016-10-26T20:36:20Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-10-26T19:48:41Z","updated_at":"2016-10-27T18:09:27Z","closed_at":"2016-10-26T20:19:14Z","pull_request":{"url":"https://api.github.com/repos/IQSS/dataverse/pulls/3433","html_url":"https://github.com/IQSS/dataverse/pull/3433","diff_url":"https://github.com/IQSS/dataverse/pull/3433.diff","patch_url":"https://github.com/IQSS/dataverse/pull/3433.patch"},"body":"Whenever the native API returns an OK response, it returns a JSON object\r\nwith the key \"data\" and lots of detail within. \"data\" is the only key\r\nreturned so I'm moving \"message\" to be within the \"data\" object to be\r\nconsistent with the rest of the native API.\r\n\r\nI'm also removing the `okResponseGsonObject` method from the\r\nAbstractApiBean for consistency. We don't want it to be cluttered with\r\nGson, Jackson or other methods."},"comment":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/comments/256724491","html_url":"https://github.com/IQSS/dataverse/pull/3433#issuecomment-256724491","issue_url":"https://api.github.com/repos/IQSS/dataverse/issues/3433","id":256724491,"user":{"login":"michbarsinai","id":1938468,"avatar_url":"https://avatars.githubusercontent.com/u/1938468?v=3","gravatar_id":"","url":"https://api.github.com/users/michbarsinai","html_url":"https://github.com/michbarsinai","followers_url":"https://api.github.com/users/michbarsinai/followers","following_url":"https://api.github.com/users/michbarsinai/following{/other_user}","gists_url":"https://api.github.com/users/michbarsinai/gists{/gist_id}","starred_url":"https://api.github.com/users/michbarsinai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michbarsinai/subscriptions","organizations_url":"https://api.github.com/users/michbarsinai/orgs","repos_url":"https://api.github.com/users/michbarsinai/repos","events_url":"https://api.github.com/users/michbarsinai/events{/privacy}","received_events_url":"https://api.github.com/users/michbarsinai/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T18:09:26Z","updated_at":"2016-10-27T18:09:26Z","body":"Is message *in* data now? it should be moved out. It's a semantic error to keep it in (again, especially in cases where the payload contains a legitimate message field).\n\nAs for user-friendly messages, it's API. It should not be UI-friednly on the successful path, since you're making an assumption on the UI itself. For one thing, the below message can't be localized. Or an app might decide to show a green checkmark near the file icon instead of a message. I think we're better off not having messages when we have payload.\n\nIdeally we'd also do the errors in a UI-independent way, but it's much harder. And the HTTP response is indeed UI independent.\n\n> On 27 Oct 2016, at 21:01, Raman Prasad <notifications@github.com> wrote:\n> \n> @michbarsinai <https://github.com/michbarsinai> : so you agree(?) that we can move message outside of data on successful calls. e.g. we would like to include a success message for the general assistance--especially to beginning programmers.:\n> \n> {\n>     \"status\": \"OK (or created)\",\n>     \"message\": \"File successfully added!\",\n>     \"data\": {\n>       \"file data\" : \"lots of info\"\n>    }\n> }\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub <https://github.com/IQSS/dataverse/pull/3433#issuecomment-256722568>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AB2UJE7M0-I7Pj8pPKn7qcnoX0LyXwQUks5q4OcHgaJpZM4Khl02>.\n> \n\n"}}
{"actor":{"display_login":"michbarsinai"}}