Jsonapi-resources: updating singular resource

Created on 6 May 2016  路  1Comment  路  Source: cerebris/jsonapi-resources

According to this issue #686 i managed to create singular resource.

But update action fails this:

https://github.com/cerebris/jsonapi-resources/blob/v0.7.0/lib/jsonapi/request.rb#L611

request.rb:
fail JSONAPI::Exceptions::MissingKey.new if data[:id].nil?

But singular resource does not have ID.

Thx.

Most helpful comment

JSON API spec says that data object MUST contain id
but singleton resource is not mentioned in spec
json-api/json-api Issue#1046

>All comments

JSON API spec says that data object MUST contain id
but singleton resource is not mentioned in spec
json-api/json-api Issue#1046

Was this page helpful?
0 / 5 - 0 ratings