Skip to content
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

[RFC] How to handle improper usage error #1514

Closed
groyoh opened this issue Feb 13, 2016 · 2 comments
Closed

[RFC] How to handle improper usage error #1514

groyoh opened this issue Feb 13, 2016 · 2 comments

Comments

@groyoh
Copy link
Member

groyoh commented Feb 13, 2016

In #1504, I figured out that in some part of the gem we do not make sure that user use the gem properly to match jsonapi specification.

The main example I ran into is when using a relationship that does not include data and do not use links and meta (Ref. #1504 (comment)):

has_one :author do
  include_data false
end
# => { relationships: { author: {} } }

This results in an empty relationship and is not allowed by jsonapi specification (http://jsonapi.org/format/#document-resource-object-relationships) but the gem does not prevent the user from doing so.

Should the gem raise an error in such case or let the user figure out on its own that he's using the gem wrongly?

@remear
Copy link
Member

remear commented Mar 15, 2016

@groyoh Was this resolved by #1516?

@bf4 bf4 modified the milestone: 0.10 Mar 31, 2016
@groyoh
Copy link
Member Author

groyoh commented Apr 9, 2016

@remear no this was not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants