Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use arrays at the top level for collections #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomyan
Copy link

@tomyan tomyan commented Aug 26, 2020

It leaves us with nowhere to put collection-wide metadata.

It leaves us with nowhere to put collection-wide metadata.
@apfrancis
Copy link
Contributor

apfrancis commented Sep 1, 2020

Looks like the committed code has an example that returns an array for a collection and an object for a singular item (this LGTM) - but the commit message talks about not using arrays at the top level for collections.

@tomyan is the suggestion here to have a wrapper object for associated metadata and an inner object for results? e.g.

{
   "foo": "bar",
   "results": []
}

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

Successfully merging this pull request may close these issues.

2 participants