featurebase
featurebase copied to clipboard
/schema endpoint should always return an array for indexes or fields
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.