This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-17
Channels
- # aleph (2)
- # announcements (20)
- # aws (43)
- # aws-lambda (5)
- # babashka (9)
- # beginners (231)
- # calva (4)
- # cider (12)
- # cljdoc (8)
- # cljsrn (3)
- # clojure (47)
- # clojure-europe (5)
- # clojure-nl (4)
- # clojure-spec (41)
- # clojure-uk (47)
- # clojuredesign-podcast (3)
- # clojurescript (20)
- # cryogen (3)
- # cursive (4)
- # data-science (2)
- # datomic (15)
- # emacs (4)
- # fulcro (21)
- # jackdaw (6)
- # jobs (1)
- # joker (13)
- # juxt (8)
- # kaocha (10)
- # malli (7)
- # off-topic (29)
- # pathom (11)
- # re-frame (19)
- # reagent (3)
- # reitit (26)
- # remote-jobs (8)
- # schema (2)
- # shadow-cljs (112)
- # spacemacs (1)
- # tools-deps (49)
- # vim (2)
- # xtdb (7)
@zhoumin79 pedestal requires it’s own Router
impl, it doesn’t understand the reitit Router
. For this, there is some glue code to swap the routing intereceptor, see https://github.com/metosin/reitit/blob/master/examples/pedestal-swagger/src/example/server.clj#L118-L135
new content-negotiaion docs by @iagwanderson! https://metosin.github.io/reitit/ring/content_negotiation.html

(defmethod ig/init-key :duct.server/pedestal
[_ {:keys [base-service
service
dev?]}]
(let [config (duct/merge-configs
base-service
service)
{router ::http/router
port ::http/port
host ::http/host} config]
(println (str "\nCreating your " (when dev? "[DEV] ")
"server http://" (or host "localhost") ":" port))
(cond-> config
true (dissoc ::http/router)
true http/default-interceptors
true (pedestal/replace-last-interceptor
(pedestal/routing-interceptor router))
dev? http/dev-interceptors
true http/create-server
true http/start)))
This is my code. Something wrong?
Sorry to waste your time. It’s my bad
@ikitommi I misspelled a config letter.
Hi quick question, running reitit with pedestal, is there a suggested resolution for this? Perhaps a wrapper or something? > There is no common interceptor spec for Clojure and all default reitit interceptors (coercion, exceptions etc.) use the Sieppari interceptor model. It is mostly compatible with the Pedestal Interceptor model, only exception being that the `:error` handlers take just 1 arity (`context`) compared to Pedestal’s 2-arity (`context` and `exception`). > > Currently, out of the reitit default interceptors, there is only the `reitit.http.interceptors.exception/exception-interceptor` which has the `:error` defined.
@U11EL3P9U maybe https://github.com/metosin/reitit/blob/master/examples/ring-spec-swagger/src/example/server.clj#L72-L77
@eoliphant the reitit-pedestal
module should take care of that.
^:--- the latest swagger-ui (3.*) looks like that. I guess we could upgrade to that.
pushed out 0.4.2
, which has direct dependency to jackson-core, to fix this sadly-way-too-common maven issue: https://clojureverse.org/t/depending-on-the-right-versions-of-jackson-libraries/5111