Skip to content

relationships routing and fetching - what is the status and plans for that? #36

Description

@cnolewajka

As per jsonapi spec:
http://jsonapi.org/format/#fetching-relationships

I tried to fetch related resources using /articles/id/relationships/author in the given example and it seems it couldn't get it work.

I tried to look at the implementation, add missing routing, etc. It looks like the current NJSONAPICORE doesn't account for that part of the spec.

If I am mistaken, would someone be kind and help me out with example?

If I am right, could we start a discussion on how to best implement it? I would willingly contribute towards the implementation.
The questions would be:

  • for /articles/id/relationships/author example, which controller should handle that?
  • in that case, would it be better to return Article object or Person object?
  • in this scenario, it looks like the entire resource object shouldn't be serialized, but only the resource identifier object; how to best pass that information to JsonApiTransformer implementation?

JSONAPICORE for the moment is by far the best implementation of the JSONAPI I found. It would be great to add that missing piece, and I will gladly contribute. If we can agree on approach related to the above questions, I guess I could plan quite a few hours pretty soon.

Thanks,
Cezary

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions