[ANN] metosin/reitit 0.3.0

This version adds support for new route syntax (supporting qualified path parameters), has 3x faster wildcard routing, a new pretty error formatter, improvements to spec coercion and to frontend routing. Big thanks to all contributors!

Example pretty error on path conflict:

(require '[reitit.core :as r])
(require '[reitit.dev.pretty :as pretty])

(r/router
  [["/ping"]
   ["/:user-id/orders"]
   ["/bulk/:bulk-id"]
   ["/public/*path"]
   ["/:version/status"]]
  {:exception pretty/exception})

Example pretty error on invalid route data:

(require '[reitit.spec :as spec])
(require '[clojure.spec.alpha :as s])

(s/def ::role #{:admin :user})
(s/def ::roles (s/coll-of ::role :into #{}))

(r/router
  ["/api/admin" {::roles #{:adminz}}]
  {:validate spec/validate
   :exception pretty/exception})

5 Likes

Thanks. Started working with reitit recently for a new application and really love the library. Great documentation, well designed and clean api and easy to get started with.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.