Skip to content

/listings/{listing_id} endpoint has wrong return type

Created by: creckord

According to the spec, /listings/{listing_id} should return the listing for the given id. However, the server returns a list of entries (hopefully with just the single entry for the listing id) instead.

This breaks clients that expect to be able to parse the response as an object according to spec.

Got:

$> curl -s -i http://localhost:8090/listings/846fc9c0-7596-4efc-8874-d9543363bba3

HTTP/1.1 200 OK
Cache-Control: no-transform, max-age=900
Content-Type: application/json
ETag: "14B12297BBF6483BFEBC6DC972352117"
Expires: Thu, 01 Jul 2021 15:59:41 GMT
Content-Length: 3538

[{"id":"846fc9c0-7596-4efc-8874-d9543363bba3","title":"Sample", ...}]

Expected:

{"id":"846fc9c0-7596-4efc-8874-d9543363bba3","title":"Sample", ...}