reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
scythx 2020-12-03T05:16:49.382700Z

Hello, is this correct way to coerce vector of string?

:get {:responses {200 {:body [string?]}}
      :handler (fn [{{:keys [query]} :parameters}]
                       (let [users (user/get-by-range! query)]
                         {:status 200
                          :body ["ok"]}))}
i keep getting error

neotyk 2020-12-03T08:37:58.383100Z

You’ll want https://clojuredocs.org/clojure.spec.alpha/coll-of

scythx 2020-12-03T05:16:49.382800Z

Response coercion failed: #reitit.coercion.CoercionError{:spec #Spec{:form (clojure.spec.alpha/coll-of (spec-tools.core/spec {:spec clojure.core/string?, :type :string, :leaf? true, :name :spec/26080}) :into []), :type :vector, :leaf? false}, :problems {:clojure.spec.alpha/problems ({:path [], :pred clojure.core/coll?, :val #object[java.io.ByteArrayInputStream 0x12d0354f "java.io.ByteArrayInputStream@12d0354f"], :via [], :in []}), ....

scythx 2020-12-03T05:16:49.382900Z

C-Squirrel 2020-12-03T11:51:50.385600Z

Hi there. Is it possible to use the newer version of Swagger UI 3 with an older version Reitit? The project is using metosin/reitit "0.3.10" but I would like to use ring-swagger-ui "3.36.0" . If I provide our dep of [metosin/ring-swagger-ui "3.36.0"] the problem is that the swagger handler still creates HTML expecting older UI (it has links to wrong css/js assets, etc)