reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Prometheus 2020-04-15T16:35:02.104Z

Anybody here use reitit in conjunction with shadow-cljs having issues with hot reloading? I’m struggling a bit

ikitommi 2020-04-15T16:36:28.104300Z

what kind of issues?

tetriscodes 2020-04-15T17:02:37.105Z

Anyone have examples are coercing an xml request with reitit?

valtteri 2020-04-15T18:44:01.105900Z

(defn ^:dev/after-load start [] (routes/init!) (r/render [app/main] (.getElementById js/document "app")))

valtteri 2020-04-15T18:44:51.107100Z

Routes/init! is a fn that calls reitit.frontend.easy/start!

valtteri 2020-04-15T18:45:16.107900Z

This works for me with shadow-cljs

2020-04-15T19:27:34.108800Z

How do you specify a header with reitit swagger? For example, a bearer token header.

nenadalm 2020-04-15T19:38:55.108900Z

using security and securityDefinitions keywords: https://swagger.io/docs/specification/2-0/authentication/ you can put it on arbitrary route like this:

["/swagger.json"
 {:get {:no-doc true
        :swagger {:info {:title "App"}
                  :consumes content-types
                  :produces accept-types
                  :security [{:bearer []}]
                  :securityDefinitions {:bearer {:type "apiKey"
                                                 :in "header"
                                                 :name "Authorization"}}}
        :handler (swagger/create-swagger-handler)}}]

Prometheus 2020-04-15T19:39:47.109100Z

where do you get routes from?

Prometheus 2020-04-15T19:40:00.109300Z

what ns?

Prometheus 2020-04-15T19:42:50.109500Z

I’m guessing user error. I can’t get the hot reloading to work properly

Prometheus 2020-04-15T19:52:00.109700Z

Ah, it worked ! Thanks

2020-04-15T19:58:12.109900Z

Cool, thanks!

2020-04-15T21:02:25.112100Z

Hi, I would to know how Reitit handle keywordize :form-params values ? Currently I have a string keyword when posting a form.