-
Notifications
You must be signed in to change notification settings - Fork 301
Customizing relationships #54
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
Comments
Commenting for clarity: According to the spec, a "relationship object" MUST contain at least one of the following: Going through the data included in fields looking for link-like data would require too much processing power and IMO introduce too much magic. What is your API structure if you don't mind? |
What do you mean by API structure? |
I'm trying to get a glimpse of what/how you are using the endpoints. What are your registered URLs looking like? On Aug 17, 2015 10:05 AM, Dawn Pattison [email protected] wrote: What do you mean by API structure? — |
We have projects, called 'nodes'. If I want to access node detail, I get this: |
@pattisdr closing this based on feedback in Gitter chat room. If it was premature let me know |
Problem
extract_relationships
should be able to handle specialized cases, like allowing alinks
ormeta
object instead of adata
object. For example, in our application it needs to:links
object instead of adata
object with type/idThe relationship data is read-only.
Desired
Potential solutions
@jerel suggested a serializer hook like
add_relationships
for customization.According to the spec, under
relationships
you must include alinks
,data
, ormeta
object. http://jsonapi.org/format/#document-resource-object-relationships. The currentextract_relationships
just allows for adata
object. It would be valuable for users to be able to have alinks
object, instead.The text was updated successfully, but these errors were encountered: