-
Notifications
You must be signed in to change notification settings - Fork 301
Including relations of relations requires include to be listed twice. #149
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
I had noticed this quirk also. Do you feel like it's a bug or a feature. I'm not sure that including |
From the spec:
I think it's a bug. The JSON API spec asks for intermediate resources to be returned. Right now DRF-JSON API doesn't return anything. |
Ah yes. It does spell it out there in the spec. |
I'm happy to fix this myself over the weekend. |
It's not a bug, but rather a missing feature IMO... Including The cited specs is talking about the |
@jsenecal are you sure including |
Yes, well, I do understand the redundancy. The example we have here might not be the best one. Let's use |
Although, reading the spec referenced by #149 (comment) it appears that it is actually the other way around and that including
Feel free to work on this but be warned that it's a feature easy to break as the tests in place are not covering all the possible use cases (like relations to self). |
Talking of tests some of the Some of the functions are quite long and might be more testable if broken up. |
The tests for utils.py are here https://github.com/django-json-api/django-rest-framework-json-api/blob/develop/example/tests/unit/test_utils.py |
@rollokb any success on implementing broken tests ? |
http://jsonapi.org/format/#fetching-includes
Currently a request like this will fail to include anything.
However it will work if I include
comments
andcomments.author
.The text was updated successfully, but these errors were encountered: