reitit 2024-06-20

In reitit.frontend:

(defn
  ^{:see-also ["reitit.core/match->path"]}
  match->path
  "Create routing path from given match and optional query-string map and
  optional fragment string."
  [match query-params fragment]
  (when-let [path (r/match->path match query-params)]
    (cond-> path
      (and fragment (seq fragment)) (str "#" (impl/form-encode fragment)))))
The query-string and fragment-string arenโ€™t particularly optional despite what the doc string says. Am I supposed to pass nils if I donโ€™t need them?

yes. PR most welcome to make the API better.

๐Ÿ™ 1

If I make that PR, should I aim for what the doc string says?

I think it would make sense

๐Ÿ‘ 1

Sounds like a perfect good-first-issue for me. ๐Ÿ˜ƒ

I am unable to find the issue with this. I added [metosin/reitit "0.7.0"] to existing project and i am getting

Syntax error (ClassNotFoundException) compiling . at (ring/middleware/multipart_params.clj:29:5).
Syntax error compiling at (reitit/ring/middleware/multipart.clj:1:1).
namespace 'ring.middleware.multipart-params' not found
because i am requiring
[reitit.ring.middleware.multipart :as multipart]
and yet when i am running https://github.com/metosin/reitit/tree/master/examples/ring-malli-swagger everything starts without a problem. deps in project clj
[ring-cors "0.1.13"]
                 [metosin/reitit "0.7.0"]
specifying [ring "1.9.6"] everything works without a problem. https://clojars.org/ring - things break. Adding: [javax.servlet/servlet-api "2.5"] doesn't solve the issue anymore What am i doing wrong?