mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
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
|
||
|---|---|---|
| .. | ||
| reitit | ||
| reitit-core | ||
| reitit-dev | ||
| reitit-frontend | ||
| reitit-http | ||
| reitit-interceptors | ||
| reitit-malli | ||
| reitit-middleware | ||
| reitit-openapi | ||
| reitit-pedestal | ||
| reitit-ring | ||
| reitit-schema | ||
| reitit-sieppari | ||
| reitit-spec | ||
| reitit-swagger | ||
| reitit-swagger-ui | ||