This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-06
Channels
- # announcements (3)
- # asami (41)
- # aws (2)
- # babashka (65)
- # beginners (85)
- # biff (7)
- # calva (10)
- # cider (5)
- # cljsrn (32)
- # clojure (6)
- # clojure-czech (3)
- # clojure-europe (10)
- # clojure-russia (4)
- # clojure-uk (3)
- # clojurescript (5)
- # core-typed (7)
- # data-science (13)
- # datomic (43)
- # etaoin (4)
- # fulcro (22)
- # graphql (3)
- # gratitude (1)
- # helix (1)
- # joyride (2)
- # liquid (10)
- # malli (16)
- # off-topic (10)
- # other-languages (1)
- # polylith (10)
- # reitit (3)
- # scittle (7)
- # shadow-cljs (103)
- # tools-deps (10)
- # vim (9)
- # xtdb (2)
hi, has anyone used reitit to handle custom methods as described here: https://cloud.google.com/apis/design/custom_methods if I have something like:
(def routes
[["/foo/{name}" :foo]
["/foo/{name}:custom" :foo-custom-verb]
["/foo/{name}/bar/{subname}" :foo-bar]])
(router routes {:syntax :bracket})
I get an exception at router creation:
{:terminators (":custom" "/bar/"), :path "/foo/{name}"}
{:type :reitit.trie/multiple-terminators,
:data {:terminators (":custom" "/bar/"), :path "/foo/{name}"}, ...
Sorry for my now deleted reply 🙂
Looks like your routes contain conflicts, as /foo/bar:custom
could match /foo/{name}
with name = "bar:custom"
and /foo/{name}:custom
. Try conflict resolution:
https://cljdoc.org/d/metosin/reitit/0.5.18/doc/basics/route-conflicts