{"action":"created","issue":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1925","repository_url":"https://api.github.com/repos/rails-api/active_model_serializers","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1925/labels{/name}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1925/comments","events_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1925/events","html_url":"https://github.com/rails-api/active_model_serializers/issues/1925","id":176892571,"number":1925,"title":"Receiving a PATCH with an Array inside the \"data\"-key should be valid","user":{"login":"ddefrenne","id":83854,"avatar_url":"https://avatars.githubusercontent.com/u/83854?v=3","gravatar_id":"","url":"https://api.github.com/users/ddefrenne","html_url":"https://github.com/ddefrenne","followers_url":"https://api.github.com/users/ddefrenne/followers","following_url":"https://api.github.com/users/ddefrenne/following{/other_user}","gists_url":"https://api.github.com/users/ddefrenne/gists{/gist_id}","starred_url":"https://api.github.com/users/ddefrenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddefrenne/subscriptions","organizations_url":"https://api.github.com/users/ddefrenne/orgs","repos_url":"https://api.github.com/users/ddefrenne/repos","events_url":"https://api.github.com/users/ddefrenne/events{/privacy}","received_events_url":"https://api.github.com/users/ddefrenne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/S:%20Needs%20Bug%20Verification","name":"S: Needs Bug Verification","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-09-14T12:20:44Z","updated_at":"2016-09-14T15:28:24Z","closed_at":null,"body":"#### Expected behavior vs actual behavior\r\n* Expected: Receiving a PATCH with an Array inside the \"data\"-key is valid, according to http://jsonapi.org/format/#crud-updating-relationships\r\n* Actual: It throws an error `ActiveModelSerializers::Adapter::JsonApi::Deserialization::InvalidDocument: Invalid payload ({:data => \"Expected Hash\"})`\r\n\r\n#### Steps to reproduce\r\nPATCH to /articles/1/relationships/comments with \r\n```json\r\n{\r\n  \"data\": [\r\n    { \"type\": \"comments\", \"id\": \"2\" },\r\n    { \"type\": \"comments\", \"id\": \"3\" }\r\n  ]\r\n}\r\n```\r\n#### Environment\r\nActiveModelSerializers Version *(commit ref if not on tag)*:  0.10.2\r\n\r\nOutput of `ruby -e \"puts RUBY_DESCRIPTION\"`:  ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]\r\n\r\nOS Type & Version: Mac OS X 10.11.6\r\n\r\nIntegrated application and version *(e.g., Rails, Grape, etc)*: Rails 4.2.7.1\r\n\r\n#### Backtrace\r\n*(e.g., provide any applicable backtraces from your application)*\r\n\r\n#### Additonal helpful information\r\n*(e.g., Gemfile.lock, configurations, PR containing a failing test, git bisect results)*"},"comment":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/comments/247051916","html_url":"https://github.com/rails-api/active_model_serializers/issues/1925#issuecomment-247051916","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1925","id":247051916,"user":{"login":"NullVoxPopuli","id":199018,"avatar_url":"https://avatars.githubusercontent.com/u/199018?v=3","gravatar_id":"","url":"https://api.github.com/users/NullVoxPopuli","html_url":"https://github.com/NullVoxPopuli","followers_url":"https://api.github.com/users/NullVoxPopuli/followers","following_url":"https://api.github.com/users/NullVoxPopuli/following{/other_user}","gists_url":"https://api.github.com/users/NullVoxPopuli/gists{/gist_id}","starred_url":"https://api.github.com/users/NullVoxPopuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NullVoxPopuli/subscriptions","organizations_url":"https://api.github.com/users/NullVoxPopuli/orgs","repos_url":"https://api.github.com/users/NullVoxPopuli/repos","events_url":"https://api.github.com/users/NullVoxPopuli/events{/privacy}","received_events_url":"https://api.github.com/users/NullVoxPopuli/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T15:28:23Z","updated_at":"2016-09-14T15:28:23Z","body":"@richmolj if you change the validation code to use the jsonapi gem's validation? does that test pass?"}}
{"actor":{"display_login":"NullVoxPopuli"}}