reitit

dominicm 2024-03-30T21:52:01.679049Z

For query parameters is there a flag when integrating with malli coercion to make all keys optional?

dominicm 2024-04-02T10:22:27.761229Z

That's a shame, seems like an important thing if you want additionally passed query parameters to be ignored. As they so often are by, e.g. social media.

ikitommi 2024-04-02T10:36:51.311289Z

you can merge [:request :query-params] with [:parameters :query] to get the full set?

ikitommi 2024-04-02T10:37:25.647199Z

but the reitit + malli integration should be redone, it’s complex but still not powerful enough to do what is needed

dominicm 2024-04-02T14:13:17.795789Z

I need to confirm, but I think I'm getting the requests rejected when there's extra query parameters

dominicm 2024-04-02T14:13:31.153059Z

I'll check now

dominicm 2024-04-02T14:25:07.427449Z

{"value":{},"type":"reitit.coercion/request-coercion","coercion":"malli","in":["request","query-params"],"humanized":{"range":["missing required key"],"sort":["missing required key"],"filter":["missing required key"]}} This is the problem, the key isn't really required and I want it automatically non-required.

dominicm 2024-04-02T14:36:58.216529Z

ah, I'm making that up that extra parameters cause a problem. So the only problem is that my explicitly requested query params aren't optional. Which requires me to use the "full" syntax rather than lite, which is a shame but hey ho 🙂

ikitommi 2024-04-01T12:36:25.385559Z

flag? don’t think so. :compile is close, but not that https://github.com/metosin/reitit/blob/master/modules/reitit-malli/src/reitit/coercion/malli.cljc#L95