featurebase icon indicating copy to clipboard operation
featurebase copied to clipboard

/schema endpoint should always return an array for indexes or fields

Open yuce opened this issue 6 years ago • 0 comments

Description

This is probably low priority, but /schema endpoint returns the following when there is no index:

$ curl localhost:10101/schema
{"indexes":null}

But returns the following if there is any index:

$ curl localhost:10101/index/i1 -d ''
$ curl localhost:10101/schema
{"indexes":[{"name":"i1","fields":null}]}

It should return empty array [] for consistency if there are no indexes; the same is true for fields.

Success criteria (What criteria will consider this ticket closeable?)

  • Return empty array if there are no indexes.
  • Return empty array if an index has no fields.

yuce avatar Jan 16 '19 12:01 yuce