Fork me on GitHub

How do you get a path-param out of a reitit backend route? I am trying to get the val associated with :id in the following manner, but keep getting a 404 file not found error.

["/edit-job/:id" {:get   (fn [{:keys [path-params ]}]
                               (crud-jobs/request-single-job (:id path-params)))}]
My front end routing has
     {:name ::edit-job
      :view #'confirm-job-modification-modal/edit-job
      :controllers [{:params (fn [match]
                               (do (println match)
                                   (:path-params (first (:controllers match)))))
                     :start  (fn [item-id] (js/console.log "item start" item-id))
                     :stop   (fn [item-id] (js/console.log "item stop" item-id))}]}]
, which works just fine (eg, the id shows in the URL and the right information about the job shows as well because it is already loaded into app-db.) When I refresh the page, I want the data to still show up for that job, but I get a 404 error instead. What's the correct way to extract a path-param from a backend route? I have tried using the documentation at and


(-> request :reitit.core/match :path-params :id)


For those who come across this later, I was able to extract the path-param from a backend-route as follows:

     {:get (fn [{:keys [path-params] :as _req}]
             (http-response/ok (core/READ :jobs (Integer/valueOf (:id path-params)))))}]
Documentation on controllers and a working example came from and


Does anyone know how to had swagger model ? like in the official swagger examples