Fork me on GitHub

Have you tried removing :parameters {} and try again?


thanks @U11EL3P9U no luck there.. I think its as @U49RJG1L0 said it’s because i’m not using coll-of but I cant’ find any sample on the metosin site or the github repos for this project that show that use case - they’re all extremely simple samples that don’t show the use of things like rendering out collections in your response. (map of list of maps) my goal for the response is to have it look like { "users": [{"id": 1… }, {"id": 2}]} (map with a list of maps) but I can’t even figure out how to just render a list yet.


You can define a spec for it elsewhere and the use the spec for example:

(s/def ::user :your-user-definition)
(s/def ::users (s/coll-of ::user))
(s/def ::response (s/keys :req-un [::users]))
You can then use ::response in your route spec definition


thank you for that clarity.. i will test (and I have to dive deeper into spec 🙂 )..


@U49RJG1L0 thanks again! - that worked great.

👍 1

Ugh, I'm getting a java.lang.ClassCastException if reitit.ring.middleware.muuntaja/format-request-middleware is on, but there's no trace in the exception


Hm, if I enable coercion, I'm getting a malli error with no path in :errors 😕 I wonder if that's related


Ok, seems like I can produce these traceless ClassCastExceptions quite easily in my dev repl, while the same exact snippet gives the trace in a vanilla, or even an nrepl shell that isn't launched in this project


Got a hint that I got bitten by omitstactraceinfastthrow