-
Notifications
You must be signed in to change notification settings - Fork 890
Closed
Description
What should be returned when an empty collection is queried?
a hash with an empty array?
example 1
GET /photos
HTTP/1.1 200 OK
Content-Type: application/json
{
"photos": []
}
example 2
GET /photos
HTTP/1.1 200 OK
Content-Type: application/json
{
"photos": [],
"meta": {
"client-ids": true
}
}
or an empty hash?
example 3:
HTTP/1.1 200 OK
Content-Type: application/json
{}
example 4:
HTTP/1.1 200 OK
Content-Type: application/json
{
"meta": {
"client-ids": true
}
}
I think a hash with an empty array is probably less likely to cause surprises and would be happy to provide a patch if you agree.
Metadata
Metadata
Assignees
Labels
No labels