Fork me on GitHub
#reitit
<
2020-04-15
>
Prometheus16:04:02

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

valtteri18:04:01

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

valtteri18:04:51

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

valtteri18:04:16

This works for me with shadow-cljs

Prometheus19:04:47

where do you get routes from?

Prometheus19:04:00

Ah, it worked ! Thanks

ikitommi16:04:28

what kind of issues?

Prometheus19:04:50

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

tetriscodes17:04:37

Anyone have examples are coercing an xml request with reitit?

markbastian19:04:34

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

nenadalm19:04:55

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)}}]

markbastian19:04:12

Cool, thanks!

Michaël Salihi21:04:25

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