This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-20
Channels
- # announcements (4)
- # babashka (10)
- # beginners (8)
- # calva (13)
- # cherry (20)
- # cider (9)
- # clojure (11)
- # clojure-austin (2)
- # clojure-europe (3)
- # clojure-norway (3)
- # clojurescript (1)
- # datomic (5)
- # dev-tooling (9)
- # fulcro (5)
- # hyperfiddle (5)
- # instaparse (1)
- # lingy (1)
- # malli (21)
- # matrix (1)
- # missionary (9)
- # off-topic (12)
- # releases (2)
- # ring-swagger (8)
- # scittle (9)
- # shadow-cljs (20)
May be a silly question regarding https://github.com/metosin/malli/pull/1044 Why recursively deref query parameters schema rather than pass by reference? Maybe it's nonsensical to pass an object as a query, but you can still use a schema path into the reference to point out the specific field. Does it mean that any reference will be inlined in query parameters? Isn't it too aggressive? Doesn't it miss on the point of naming attributes?
not sure how this works now with openapi3 thou. It would be great to be able to sunset some of the older things (like swagger2-support), many bugs need fixing on both, spanning over 3+ libs.
I see that openapi docs eventually use json-schema, while it should use something that overrides swagger
just tested reitit with the latest malli, there is a issue with openapi + definitions: https://github.com/metosin/reitit/pull/675
FAIL in (recursive-test) (openapi_test.clj:859)
spec is valid
expected: (nil? (validate spec))
actual: (not (nil? {"errors" "Can't resolve #/definitions/friend", "valid" false}))
ok, I think it’s this one, https://github.com/metosin/reitit/issues/662. will check with on monday
Fresh from the oven, [metosin/malli "0.16.0"]
! dropped support for Java8, otherwise it’s a non-breaking / patch release. Thanks to all contributors, mainly @ambrosebs 🙇
> • BREAKING: minimum Java-version is now Java11
> • allow changing prefix of json-schema $refs via option :malli.json-schema/definitions-path
https://github.com/metosin/malli/pull/1045
> • Inline refs in non-`:body` swagger parameters https://github.com/metosin/malli/pull/1044
> • Fix flaky test https://github.com/metosin/malli/pull/1040
> • Utility to update entry properties: mu/update-entry-properties
https://github.com/metosin/malli/pull/1037
> • Fix actions cache https://github.com/metosin/malli/pull/1036
> • Only humanize one of :min
/ :max
when different https://github.com/metosin/malli/pull/1032
> • Distinguish between symbols and strings in humanize https://github.com/metosin/malli/pull/1031
> • Fix :map-of
:min
and unreachable generator, explain such-that failures https://github.com/metosin/malli/pull/1029
Why is the min Java version changing? I didn’t see any rationale in the repo and couldn’t find a commit since then that seemed to have any reason to need Java 11 min.
Valid point. We discussed this internally and decided to roll-back to support 8. Thanks!
Hi!
Beginner question - I'm looking for an equivalent to [:or [....
. Basically I am trying to construct a schema for a map with keys that will be disjoint sets depending on the state of the system - A logical or.
i.e.
Case A: {:a :v, :b :v}
Case B: {:c :v}
I see an [:and ...
but not an [:or ...
- What would a schema like this look like?
Thanks!Hi! If to search this channel, there is a lot of discussion about the keysets. Nothing really good built-in yet.
Unrelated beginner question: Which part of the documentation should I look into in order to use a predicate in a schema that isn't provided by default? I am using https://github.com/clj-commons/manifold (although its a generic question) which provides predicates I would like to use in a schema:
[:map [:source m/stream?]]
The schema above fails with:
Execution error (ExceptionInfo) at malli.core/-exception (core.cljc:136).
:malli.core/invalid-schema
Thanks!https://github.com/metosin/malli/blob/master/docs/function-schemas.md function schemas (`[:fn m/stream?]`) are what you’re looking for.
Awesome thanks!