Tommi Reiman

Results 447 comments of Tommi Reiman

original: https://www.reddit.com/r/Clojure/comments/ad228o/sessions_under_the_leiningen_reagent_template/

quick & dirty sample: ```clj (require '[jsonista.core :as j]) (-> "https://petstore.swagger.io/v2/swagger.json" (slurp) (j/read-value (j/object-mapper {:decode-key-fn true})) :paths (->> (map (fn [[k v]] [(subs (str k) 1) (->> v (map (fn...

yes, having just the linear-router on cljs would suffice.

https://clojureverse.org/t/using-schema-like-schemas-in-malli/8613

what if there is a endpoint key, e.g. `:name` on a intermediate route, which has multiple intermediate/leaf child routes, do the values inherit into all of those too? Might be...

could you paste your benchmark @alexanderkiel? We should foremost be correct and only after then be fast, but still - always be fast :) can't recall any reasoning on the...

Good catch. having a middleware effecting all routes, all defined methods should have the `:roles` defined. Reitit creates an `:options` route for all routes and it doesn't have the :roles...

the compiled routes for the given app: ```clj (-> ["/api" {:get {:handler identity :roles #{:admin}}}] (ring/router) (r/compiled-routes)) ;[["/api" ; {:get {:handler #object[clojure.core$identity], :roles #{:admin}}} ; #Methods{:get #Endpoint{:data {:handler #object[clojure.core$identity], ;...

There is an option for this in the [swagger spec](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) called `:basePath`. if you add `{:swagger {:basePath "/service-name"}}` to the [route data](https://github.com/metosin/reitit/blob/master/examples/ring-spec-swagger/src/example/server.clj#L34), it should add that to all paths. I...