I what the idiomatic way of handling optional query parameters in Compojure and assign undefined query parameters to a default value.
I've tried this (which perhaps obviously doesn't work):
(GET "/something/:id" [id q :<< as-int :or {q (System/currentTimeMillis)}]
....)
I'd like this route to match both:
curl /something/123
and
curl /something/123?q=234542345
(Note a similar question has been posted here but it uses Swagger)