related resource proposals does not address pagination
nesting of related resources needs to have a way to paginate the related resources. For example, if you want to get all the spaces for an org or all the routes for an app.
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/100796616.
perhaps mvp is to have a maximum of a given resource, if the amount exceeds the request we return an error and point the user to the nested endpoint which has pagination already included.
it also may be appropriate to only enable related resource inclusion for relationships we know will be safely capped
From second cage match:
Maybe cut off after 20/50 and return nothing with link to paginated endpoint? Mechanics uncertain. Not sure how common pagination will be needed if we limit including resources to reasonable endpoints.
Also this thread may be useful: https://github.com/json-api/json-api/issues/509
GET /v3/apps/123?include=routes
{
"guid": 123,
"included": {
"routes": {
"resources": [{"guid": 1}, {"guid": 2}],
"links": {
"related": "/v3/apps/guid/routes"
},
"pagination": {
"next": {
"href": "/v3/apps/guid/routes?page=2"
}
}
}
}
Pagination should be something like this. This is the same as how we paginate our other collections.
Finished. Added a section for paginating related resources. 7e9913c
:8ball: