You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Resources should be able to return embedded versions of other resources.
To summarize our current thinking:
Callback can convert its return value to WP_JSON_Response and add HAL-compatible links to other resources, as specified by the route.
If the request asks for embedded resources, the Server will add embedded representations of the resources to the request by resolving the route (codename Rrrrrrr)
"embedded" is a context which returns the bare minimum of public data.
At least two open questions:
If prepare_item_for_response is supposed to add references to other entities, how does that work for collections?
How can one Response type know how to reference another Response type without knowing its Route? Do we need a global naming paradigm too, or would it be acceptable to reference a Controller class, which would make it easier to look up via the server?