reitit

pez 2024-06-20T10:39:04.718399Z

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?

pez 2024-06-21T08:04:39.041789Z

Like so? https://github.com/metosin/reitit/pull/685

ikitommi 2024-06-20T11:07:04.863419Z

yes. PR most welcome to make the API better.

๐Ÿ™ 1
pez 2024-06-20T11:27:33.577059Z

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

ikitommi 2024-06-20T11:50:11.168299Z

I think it would make sense

๐Ÿ‘ 1
pez 2024-06-20T11:51:41.873499Z

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

lepistane 2024-06-20T12:09:12.191939Z

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?