-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Hi -- finally getting around to preparing tested version of the modifications I made to my fork a couple months ago, and looking for how-to-handle advice.
JSONAPI specifies that:
Related documents MUST be included in a top level "linked" object, in which they are grouped together in arrays according to their type.
The type of each relationship MAY be specified in the "links" object with the "type" key. This facilitates lookups of related documents by the client.
The oat mechanism for linked entities (entity or entities) currently collects linked entities under the relationship name, rather than the type of the linked entity. (in some examples from the JSONAPI spec, under author rather than people).
A change to use types instead of link names would be a breaking change to the current behavior of the entity/entities serializer rules. Should I handle these by:
- fully replacing the functionality (cause the break) and modifying the tests to match,
- provide a global flag to use new/old behavior (default which way?)
- provide a per-invocation flag to use one behavior or the other (plus maybe a global to specify default?, which way to default if not specified?),
- some other approach?
Thanks.