This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-30
Channels
- # architecture (10)
- # babashka (11)
- # beginners (12)
- # calva (7)
- # clojure (7)
- # clojure-europe (2)
- # clojure-norway (12)
- # clojure-spec (2)
- # events (7)
- # fulcro (3)
- # hyperfiddle (3)
- # instaparse (12)
- # lsp (2)
- # malli (3)
- # missionary (20)
- # music (1)
- # off-topic (18)
- # reitit (9)
- # releases (4)
- # squint (5)
- # xtdb (32)
For query parameters is there a flag when integrating with malli coercion to make all keys optional?
flag? don’t think so. :compile
is close, but not that https://github.com/metosin/reitit/blob/master/modules/reitit-malli/src/reitit/coercion/malli.cljc#L95
That's a shame, seems like an important thing if you want additionally passed query parameters to be ignored. As they so often are by, e.g. social media.
you can merge [:request :query-params]
with [:parameters :query]
to get the full set?
but the reitit + malli integration should be redone, it’s complex but still not powerful enough to do what is needed
I need to confirm, but I think I'm getting the requests rejected when there's extra query parameters
{"value":{},"type":"reitit.coercion/request-coercion","coercion":"malli","in":["request","query-params"],"humanized":{"range":["missing required key"],"sort":["missing required key"],"filter":["missing required key"]}}
This is the problem, the key isn't really required and I want it automatically non-required.