This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-12
Channels
- # announcements (19)
- # babashka (33)
- # beginners (96)
- # bitcoin (6)
- # cider (11)
- # circleci (5)
- # clj-kondo (22)
- # cljs-dev (4)
- # cljsjs (2)
- # clojure (65)
- # clojure-australia (9)
- # clojure-berlin (1)
- # clojure-europe (53)
- # clojure-italy (2)
- # clojure-nl (2)
- # clojure-uk (42)
- # clojurescript (9)
- # conjure (1)
- # cursive (33)
- # data-oriented-programming (1)
- # data-science (6)
- # datomic (12)
- # emacs (12)
- # fulcro (7)
- # graphql (4)
- # honeysql (5)
- # jobs (2)
- # juxt (8)
- # lsp (30)
- # malli (9)
- # off-topic (9)
- # other-languages (1)
- # re-frame (17)
- # reagent (11)
- # reitit (5)
- # releases (2)
- # remote-jobs (3)
- # shadow-cljs (39)
- # spacemacs (6)
- # sql (2)
- # testing (3)
- # tools-deps (43)
- # vim (5)
- # xtdb (11)
I want to protect the swagger doc built from the malli data model using buddy. I have seen the reitit examples which protect routes but it's not clear how this integrates into the Swagger model ... I will also x post to reitit
many ways of stripping extra keys from maps: https://www.reddit.com/r/Clojure/comments/m3hx1e/how_do_i_walk_a_complex_map_and_remove_keys_based/
Just had a thought. Can malli be used in places where currently meander or matchete (https://github.com/xapix-io/matchete) are used? Although this works, it is a bit cumbersome:
user=> (m/validate [:cat [:enum 1] :any [:enum 3]] '[1 2 3])
true
And how could I get the destructured value, after validation?
user=> (m/explain [:catn [:a [:enum 1]] [:b :any] [:c [:enum 3]]] '[1 2 3])
nil
oh of course, parse
user=> (m/parse [:catn [:a [:enum 1]] [:b :any] [:c [:enum 3]]] '[1 2 3])
{:a 1, :b 2, :c 3}
Is there a way to indicate that you want to ignore a certain binding in the parsed output?
I hacked it like this: https://gist.github.com/borkdude/26906ee15585ed5e1b7a8eda4cc1ee18