Fork me on GitHub
#biff
<
2024-01-05
>
Olav Fosse14:01:47

Have you considered including :path-params in :params?

Jacob O'Bryant19:01:21

I haven't. The current behavior of merging query and form params is done by one of the middleware biff includes IIRC--muuntaja I think? It would probably be worth thinking about whether even that is a good thing--e.g. should people explicitly destructure query-params + form-params + path-params separately? or merge them all into one? I guess it wouldn't hurt probably to have params be the combination of everything and then people can decide whether to use it or not. in short: I haven't thought about it at all up until now, but I'm open to it. I'd just want to spend a little hammock time before merging it into Biff.

👍 2
ikitommi12:01:27

Muuntaja just handles the body-params, so something else. Reitit coercion middleware push the coerced parameters under :parameters with submaps for :query, :path, :header, :body etc. If you are interested in using those, I could pair up to integrate those in.

Jacob O'Bryant19:01:40

Thanks, good to know! I'll take a look at that sometime