This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-13
Channels
- # announcements (3)
- # babashka (130)
- # beginners (73)
- # calva (22)
- # cider (46)
- # cljdoc (18)
- # cljs-dev (196)
- # cljsrn (18)
- # clojure (255)
- # clojure-europe (2)
- # clojure-finland (8)
- # clojure-gamedev (1)
- # clojure-germany (2)
- # clojure-losangeles (6)
- # clojure-nl (1)
- # clojure-spec (16)
- # clojure-uk (33)
- # clojurescript (32)
- # community-development (1)
- # conjure (40)
- # core-logic (11)
- # cursive (4)
- # datascript (8)
- # devcards (17)
- # emacs (21)
- # exercism (2)
- # fulcro (29)
- # funcool (15)
- # graalvm (18)
- # jobs (17)
- # jobs-rus (1)
- # lambdaisland (1)
- # lumo (1)
- # malli (19)
- # off-topic (15)
- # pathom (22)
- # quil (7)
- # re-frame (3)
- # reagent (3)
- # shadow-cljs (14)
- # spacemacs (41)
- # specter (2)
- # sql (5)
- # tree-sitter (1)
- # unrepl (16)
- # vscode (3)
- # xtdb (11)
- # yada (1)
haven’t used the discriminator, so not sure how it should work. what is the expected swagger schema?
(m/validate schema (m/decode
schema data
(mt/transformer mt/strip-extra-keys-transformer mt/string-transformer)))))
[:multi
{:dispatch :type, :decode/string (fn* [p1__40150#] (update p1__40150# :type keyword))}
[:other [:map [:data [:map [:nombre string?] [:apellido string?] [:edad int?]]] [:type [:= :other]]]]
[:one [:map [:data [:map [:nombre string?] [:apellido string?] [:kk int?]]] [:type [:= :one]]]]]
on an ideal I would have liked to be able to use that schema in the {:paremeters {:body here}}
am I right that this is not supported? should it be?
(def m [:map
[:i {:error/message "not a number"} int?]])
(me/humanize (m/explain m {:i "123"}))
;; => {:i ["should be int"]}
I find in general there's some annoying asymmetry between properties on map entries vs properties schemas. See also my PR for adding :gen/gen
/ :gen/elements
/ :gen/fmap
support to map entries
thanks @U8JTE9PG8. I'm interested in general if users should expect props on schemas to also work on map entries, or if that's not a design goal.
Thanks @U07FP7QJ0 for the PR! Will check it soon along others. I would like to have first class entry meta, not sure what is the best way for it.