Closed rlovtangen closed 5 years ago
2.0.0-alpha27
Given a route like
(api/GET "/foo" [] {:responses {status/ok {:schema ::int-list}}} (response/ok (list 1 2 3)))
with a spec like
(s/def ::int-list (su/spec (s/coll-of int?) {}))
the response returns the collection is reversed order:
$ curl -X GET --header 'Accept: application/json' 'http://localhost:8003/foo' [3,2,1]
With version 2.0.0-alpha26 and earlier the collection keeps its original order:
$ curl -X GET --header 'Accept: application/json' 'http://localhost:8003/foo' [1,2,3]
sorry for the lag, this is a bug.
found a fix for this in spec-tools.
Library Version(s)
2.0.0-alpha27
Problem
Given a route like
with a spec like
the response returns the collection is reversed order:
With version 2.0.0-alpha26 and earlier the collection keeps its original order: