This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-09
Channels
- # beginners (121)
- # boot (28)
- # cider (106)
- # clara (57)
- # cljs-dev (70)
- # cljsrn (6)
- # clojure (145)
- # clojure-dev (7)
- # clojure-italy (36)
- # clojure-russia (42)
- # clojure-spec (26)
- # clojure-uk (127)
- # clojurescript (103)
- # core-async (10)
- # cursive (56)
- # datascript (66)
- # datomic (16)
- # defnpodcast (1)
- # emacs (18)
- # events (6)
- # figwheel (1)
- # jobs (1)
- # luminus (1)
- # lumo (44)
- # off-topic (58)
- # om (17)
- # onyx (2)
- # parinfer (75)
- # pedestal (4)
- # re-frame (18)
- # ring (4)
- # ring-swagger (8)
- # rum (7)
- # spacemacs (7)
- # specter (2)
- # sql (4)
- # unrepl (39)
- # untangled (17)
- # vim (3)
- # yada (21)
@malcolmsparks Apologies if this is a common question that has already been answered, but how far along is the effort to use spec for parameter coercion in yada?
It hasn't progressed recently. Schema makes a good default choice but one that has been made optional via yada bundles. Nothing to stop you providing your own validation logic based on clojure.spec. If you need swagger support, that's something I not very up to date with. @ikitommi may be a good person to ask, or check ring-swagger updates.
No worries about asking anything you like on this channel.
Found this GitHub issue: https://github.com/metosin/ring-swagger/issues/95
And https://github.com/metosin/spec-tools looks like it covers coercion pretty well.
In bidi, is there a way to walk and update the handlers? The closest I have found is route-seq
but it does not give me the possibility to change the handler.
clojure.walk/postwalk
I use that a lot
I am using that now, but it does not work if I have something like this:
["/" [ [[ "foo/" :id "/bar"] :handler1]
[[ "foo/" :id "/zoom" :id2] :handler2]]]
I am looking for keyword?
but this is not enough.Look for a pair
With a keyword on the left
I tend to only use for resources where a can check with instance?
Ah yes that makes sense to destructure the route.
I can't check the instance?
in this case (in fact the update is to create an instance).
Thanks!
If you are really stuck, you could tag some of your structures with clojure metadata. Very useful feature in some cases.