reitit/modules/reitit-core
Joel Kaasinen d2f44b8015 fix: match-by-name! should throw when match-by-name is PartialMatch
If a path param was nil, match-by-name (via impl/path-for) was
treating the parameter as missing, but match-by-name!
(via impl/throw-on-missing-path-params) was treating it as present.

That is:

(reitit/match-by-name router :page {:id "1"}) ;; => Match
(reitit/match-by-name router :page) ;; => PartialMatch
(reitit/match-by-name router :page {:id nil}) ;; => PartialMatch

(reitit/match-by-name! router :page {:id "1"}) ;; => Match
(reitit/match-by-name! router :page) ;; => ExceptionInfo: missing path-params for route /pages/:id -> #{:id}
(reitit/match-by-name! router :page {:id nil}) ;; => nil  !!!

fixes #758
2025-10-24 09:58:03 +03:00
..
.clj-kondo Setup clj-kondo files for each module 2022-01-24 12:39:42 +02:00
java-src/reitit Make Trie$Match immutable 2019-05-22 21:10:51 +03:00
src/reitit fix: match-by-name! should throw when match-by-name is PartialMatch 2025-10-24 09:58:03 +03:00
project.clj Release 0.9.1 2025-05-27 14:04:31 +03:00