opf/openproject — pull request #2164 by NobodysNightmare (2014-11-07 13:56:16+00:00)
Title: Feature/specify collections

Basic groundwork for https://community.openproject.org/work_packages/16986

This specification deals with collections, another quite fundamental concept that needs specification before it is too late to adapt existing implementations to the changes proposed.

What are the goals?
================

* one specification to rule them all (currently collections are quite diverse regarding their implementation)
* different pagination options
* no pagination
* pagination where the client wants to display pages
* pagination where the client wants it all (e.g. infinite scrolling)
* enough flexibility to allow extensions (e.g. links to filtered variants; read: in the **future**)

What changes with regards to the existing API-Implementation?
==================================================

* there is a set of required properties (currently collections look very different)
* `total` and `count` are now prefix-less (they are not very special at all)
* the `_type` of every collection is `Collection` instead of `pluralOfResourceName`
* the values are stored in `"_embedded": { "elements" }`, not `"_embedded": { "pluralOfResourceName" }`