RestPack / restpack_serializer

Model serialization, paging, side-loading and filtering
MIT License
175 stars 43 forks source link

returning array vs object for an individual resource #99

Open rhec opened 10 years ago

rhec commented 10 years ago

As I read it the current json-api spec says the api should return a single object when a single resource is requested, rather than an array of length one. RestPack currently returns an array. I can understand holding off on changing this, given there is still open discussion about it, so I wanted to ask if you'd consider a patch to match the current spec. If not, what about considering a patch to remove the pagination metadata from individual resource responses, just to reduce overhead?

GavinJoyce commented 10 years ago

Excluding paging meta data for individual resources would certainly be welcome. I would like to hold off on modifying the default for single resource representation until the liked discussion has completed, although a configuration option would allow us to provide both

ronindesign commented 8 years ago

This should probably be closed since pending discussion has been closed