Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Disambiguate models and collections in OPTIONS data #2

Open
rmccue opened this issue May 30, 2017 · 0 comments
Open

Disambiguate models and collections in OPTIONS data #2

rmccue opened this issue May 30, 2017 · 0 comments

Comments

@rmccue
Copy link
Member

rmccue commented May 30, 2017

See WP-API/client-js#167

it would be great if clients could work out whether a response is a model or a collection based on the OPTIONS response. Right now, we supply schema, but this is always for a singular item.

Not sure how best we indicate this. We could specify on the endpoints a hint, or we could change the schema to use [ type: "array", items: { ... } } instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant