-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json_api_client overriding the type given by the server! #247
Comments
Can you go into a little bit more detail? I don't see the type being overwritten anywhere in the code, so i'm not sure what you mean? |
@gaorlov I guess @krainboltgreene has the same problem as me. My resource on a server has a
When I try to update this resource |
Looks like it's not so easy. |
@bguban I guess my question here is: should we apply this to all the special attributes ( |
JSON API specification doesn't restrict of using |
@bguban it does specify that |
Looks like I was wrong about the specification https://jsonapi.org/format/#document-resource-object-fields
That means that the library follows the spec, but would be nice to have the ability to access attributes directly. For the case described above it can be like: security.type # => 'securities'
security.attrs.type # => 'stock'
security.attrs.type = 'fund'
# should not change top-level type
security.type # => 'securities' |
The server is responding with
type: 'user'
, but my remote class is rewriting that to the name of the class. Why would you do this?The text was updated successfully, but these errors were encountered: