Jsonapi-resources: How to create multi-level nested routes? (It expects 2nd level relationship to be at root level)

Created on 19 Nov 2015  路  5Comments  路  Source: cerebris/jsonapi-resources

If I need multi-nested routes like:

GET /organizations/:org_id/users/:user_id/addresses/:address_id

When I get organizations I see the related link for /organization/:org_id/users, however when I get the user it's related link is /users/:user_id/addresses when I feel it should be
/organizations/:org_id/users/:user_id/addresses

Basically it expects the 2nd level relationship to be a route at the root level.

How to handle this?

Thanks.

Enhancement

Most helpful comment

Any more feedback/plans on this? Any ideas what I could do in the mean time? Thanks.

All 5 comments

+1

Hi, any feedback would be appreciated. :)

+1

Sorry for the delay in responding. Currently this isn't supported in JR, and it will require a fairly major overhaul to get it to work (I think). The good news is we're considering some changes in the routes and controllers and I hope to support this type of nested route.

Any more feedback/plans on this? Any ideas what I could do in the mean time? Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

achan picture achan  路  6Comments

thedeeno picture thedeeno  路  6Comments

chadwtaylor picture chadwtaylor  路  4Comments

edipox picture edipox  路  4Comments

lgebhardt picture lgebhardt  路  5Comments