Open
Description
Expected behavior vs actual behavior
- Expected: Receiving a PATCH with an Array inside the "data"-key is valid, according to http://jsonapi.org/format/#crud-updating-relationships
- Actual: It throws an error
ActiveModelSerializers::Adapter::JsonApi::Deserialization::InvalidDocument: Invalid payload ({:data => "Expected Hash"})
Steps to reproduce
PATCH to /articles/1/relationships/comments with
{
"data": [
{ "type": "comments", "id": "2" },
{ "type": "comments", "id": "3" }
]
}
Environment
ActiveModelSerializers Version (commit ref if not on tag): 0.10.2
Output of ruby -e "puts RUBY_DESCRIPTION"
: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
OS Type & Version: Mac OS X 10.11.6
Integrated application and version (e.g., Rails, Grape, etc): Rails 4.2.7.1
Backtrace
(e.g., provide any applicable backtraces from your application)
Additonal helpful information
(e.g., Gemfile.lock, configurations, PR containing a failing test, git bisect results)