This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-29
Channels
- # babashka (168)
- # beginners (60)
- # calva (21)
- # cider (44)
- # clj-kondo (27)
- # cljs-dev (4)
- # cljsrn (2)
- # clojure (157)
- # clojure-australia (27)
- # clojure-bay-area (7)
- # clojure-czech (1)
- # clojure-europe (94)
- # clojure-nl (2)
- # clojure-spec (3)
- # clojure-sweden (11)
- # clojure-uk (35)
- # clojurescript (19)
- # cursive (12)
- # events (1)
- # figwheel-main (1)
- # fulcro (28)
- # honeysql (7)
- # jackdaw (9)
- # kaocha (4)
- # keechma (1)
- # malli (7)
- # midje (1)
- # missionary (1)
- # music (1)
- # off-topic (45)
- # pathom (18)
- # polylith (6)
- # practicalli (4)
- # random (1)
- # reagent (3)
- # reitit (3)
- # shadow-cljs (74)
- # sql (9)
So I'm using Reitit with Schema for validation, and I've run into a situtation where Reitit discards some type information that I need when validation fails. Specificially, it calls schema.utils/error-val
here: https://github.com/metosin/reitit/blob/master/modules/reitit-schema/src/reitit/coercion/schema.cljc#L89. I'd like for it to just do (if schema.utils/error? coerced) (coercion/map->CoercionError {:schema schema, :error coerced})
instead. How can I make this happen?
Hello, I just started with Reitit, found it awesome, but I have some doubts, I'm using reitit with ring, I was reading about rote data https://cljdoc.org/d/metosin/reitit/0.5.13/doc/basics/route-data, it's a great feature! But what if I want all my routes have access to the same data? I tried to put it in the top level but it didn't work:
(defn app
[deps]
(ring/ring-handler
(ring/router ["/api"
["/funds" {:name ::funds-list
:get handler}]])
{:data {::deps deps}}))
if I try to access request data with (println (-> req ring/get-match :data))
it retruns only {:name :fiis-api.service/funds-list, :get {:handler #object[fiis_api.service$handler 0x3e71ff8 fiis_api.service$handler@3e71ff8]}}
also is there a way to do an auto reload after files changed for development?