WP-API/proposals

Disambiguate models and collections in OPTIONS data

Opened this issue · 0 comments

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.