Fork me on GitHub
#pedestal
<
2022-09-16
>
ddeaguiar18:09:22

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!

šŸŽ‰ 15
ā¤ļø 1
Eugen19:09:53

thanks for your effort @U0FL657GR šŸ‘ Good luck @bonkydog and @hlship, any plans for the project ?

šŸ™‡ 1
jmv19:09:10

Thanks for all the work you've put into pedestal over the years!

bonkydog20:09:09

We've got a fix for custom loggers ready soon and are looking at improving tracing and async.

bonkydog20:09:54

We're also got some catching up to do on PRs. šŸ˜…

šŸ‘ 2
2
Ivan21:09:32

thank you!

erwinrooijakkers19:09:14

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

souenzzo08:09:11

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)))

souenzzo08:09:06

Pedestal do not support reitit. Reitit supports pedestal, so it more about a #reitit question.

erwinrooijakkers19:09:25

the /ping endpoint does work