This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-22
Channels
- # announcements (16)
- # babashka (7)
- # babashka-sci-dev (14)
- # beginners (34)
- # calva (80)
- # clj-kondo (23)
- # cljdoc (17)
- # cljs-dev (1)
- # cljsrn (10)
- # clojure (51)
- # clojure-berlin (3)
- # clojure-europe (14)
- # clojure-italy (10)
- # clojure-nl (2)
- # clojure-norway (211)
- # clojure-uk (5)
- # clojurescript (4)
- # cursive (22)
- # datalevin (12)
- # datomic (2)
- # defnpodcast (1)
- # duct (5)
- # emacs (4)
- # events (2)
- # fulcro (3)
- # graalvm (1)
- # interop (3)
- # introduce-yourself (4)
- # java (1)
- # jobs (7)
- # kaocha (38)
- # leiningen (3)
- # lsp (11)
- # malli (4)
- # membrane (5)
- # music (1)
- # off-topic (28)
- # pathom (13)
- # pedestal (3)
- # polylith (4)
- # portal (10)
- # practicalli (1)
- # re-frame (33)
- # reitit (2)
- # remote-jobs (1)
- # sci (6)
- # shadow-cljs (49)
- # sql (4)
- # xtdb (3)
I have this schema
(def ResourceIdentifier
[:schema {:registry
{::resource-key :keyword
::path-param [:or :string :int]
::query-params map?
::resource-ident [:cat
[:+ [:or
[:ref ::path-param]
[:ref ::resource-key]]]
[:? [:ref ::query-params]]]}}
::resource-ident])
and i get a :malli.core/potentially-recursive-seqex
although I don't see how it's recursive.you should take away the :ref
wrapping. :ref
is potentially recursive. Using a plain reference value (e.g. ::path-param
) should work ok.
@U055NJ5CC I see, thanks alot.
The equivalent in clojure.spec works fine
(s/def ::resource-key keyword?)
(s/def ::path-param (s/or :string string? :int int?))
(s/def ::query-params map?)
(s/def ::resource-ident (s/cat :path (s/+ (s/or :resource-key ::resource-key
:path-param ::path-param))
:query-params (s/? ::query-params)))