This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-16
Channels
- # ai (5)
- # announcements (47)
- # aws (11)
- # babashka (20)
- # beginners (85)
- # biff (1)
- # calva (72)
- # cider (9)
- # clj-kondo (37)
- # cljfx (9)
- # cljs-dev (1)
- # clojars (2)
- # clojure (61)
- # clojure-berlin (2)
- # clojure-europe (189)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-uk (2)
- # clojurescript (51)
- # conjure (3)
- # cursive (4)
- # data-science (6)
- # datomic (6)
- # events (5)
- # fulcro (16)
- # gratitude (9)
- # holy-lambda (9)
- # introduce-yourself (6)
- # lsp (13)
- # malli (8)
- # membrane (2)
- # off-topic (47)
- # pedestal (11)
- # re-frame (15)
- # reitit (1)
- # releases (2)
- # rewrite-clj (6)
- # rum (4)
- # shadow-cljs (2)
- # tools-deps (3)
- # xtdb (25)
- # yada (13)
Hi folks, Iād like to announce that @bonkydog and @hlship will be taking over the stewardship of Pedestal. This transition will result in more consistent support for Pedestal and increase the opportunity for community involvement and innovation. Iād like to thank Brian and Howard for taking on this role and I look forward to all the great work that follows!
thanks for your effort @U0FL657GR š Good luck @bonkydog and @hlship, any plans for the project ?
We've got a fix for custom loggers ready soon and are looking at improving tracing and async.
How to make swagger routes? I have now
(ns service
(:require
[io.pedestal.http :as http]
[reitit.swagger :as swagger]
[reitit.swagger-ui :as swagger-ui]))
(def swagger-handler
(swagger/create-swagger-handler))
(def swagger-ui-handler
(swagger-ui/create-swagger-ui-handler))
(def ping-handler
(fn [_req] {:status 200, :body "pong"}))
(def routes
`[[["/api"
["/ping" {:get ping-handler}]]
^{:no-doc true}
["/"
["/swagger.json" {:get swagger-handler}]
["/api-docs/*" {:get swagger-ui-handler}]]]])
(def service
{:env :prod
::http/routes routes
::http/allowed-origins [""]
::http/resource-path "/public"
::http/type :jetty
::http/port 3000
::http/host "0.0.0.0"
::http/container-options {:h2c? true
:h2? false
:ssl? false}})
but when I navigate to swagger.json I get
internal server exception .. Caused by: java.lang.IllegalArgumentException: No implementation of method: :compiled-routes of protocol: #'reitit.core/Router found for class: nil
Hey @U2PGHFU5U See this doc https://github.com/metosin/reitit/blob/master/doc/http/pedestal.md Highlight to this part:
;; no pedestal routes
::server/routes []}
(server/default-interceptors)
;; swap the reitit router
(pedestal/replace-last-interceptor
(pedestal/routing-interceptor
(http/router routes)))
Pedestal do not support reitit. Reitit supports pedestal, so it more about a #reitit question.
Thanks
the /ping endpoint does work