Fork me on GitHub
#reitit
<
2021-11-24
>
zalky17:11:20

Hi there, I'm kind of stuck trying to figure out bi-directional coercion of path-params. match-by-name does not seem to do the reverse of match-by-path when it comes to coercion. As best I can tell, match-by-path takes the coercion methods defined by the routes and applies them to the match, whereas match-by-name seems to URL encode the strings directly, bypassing the coercion. Have I got this right? My intuition would have been that given a two way data spec, like malli, the encoding and decoding would both be driven by the same spec. I've looked through the code, but I just can't quite figure out how the bi-directionality is supposed to work. Any pointers would be much appreciated.