diff --git a/modules/reitit-core/src/reitit/impl.cljc b/modules/reitit-core/src/reitit/impl.cljc index 28499e75..a012488f 100644 --- a/modules/reitit-core/src/reitit/impl.cljc +++ b/modules/reitit-core/src/reitit/impl.cljc @@ -187,6 +187,10 @@ (when (namespace this) "/") (name this))) + #?(:clj Boolean + :cljs boolean) + (into-string [this] (str this)) + #?(:clj Number :cljs number) (into-string [this] (str this)) diff --git a/test/cljc/reitit/impl_test.cljc b/test/cljc/reitit/impl_test.cljc index 8ae5839d..b822666f 100644 --- a/test/cljc/reitit/impl_test.cljc +++ b/test/cljc/reitit/impl_test.cljc @@ -23,18 +23,32 @@ impl/into-string impl/url-encode))) (is (= "reitit.impl-test/kikka" (-> ::kikka - impl/into-string - impl/url-encode - impl/url-decode)))) + impl/into-string + impl/url-encode + impl/url-decode)))) (deftest path-params-test (is (= {:n "1" + :n1 "-1" + :n2 "1" + :n3 "1" + :n4 "1" + :n5 "1" :d "2.2" + :b "true" :s "kikka" + :u "c2541900-17a7-4353-9024-db8ac258ba4e" :k "kikka" :qk "reitit.impl-test%2Fkikka"} (impl/path-params {:n 1 + :n1 -1 + :n2 (long 1) + :n3 (int 1) + :n4 (short 1) + :n5 (byte 1) :d 2.2 + :b true :s "kikka" + :u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e" :k :kikka :qk ::kikka}))))