Skip to content

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

Open
tomyan wants to merge 1 commit into
masterfrom
singluar-response
Open

Don't use arrays at the top level for collections#5
tomyan wants to merge 1 commit into
masterfrom
singluar-response

Conversation

@tomyan
Copy link
Copy Markdown

@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
Copy Markdown
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