This is what I get with (ok 123)
Is it possible to return integers in the metosin compojure sweet library?
My usecase is a simple one: I have to re-create the api that one of my frontend componets uses,
I have the complete api implemented with compojure,
and returning integer only (without a map as a wrapper) fucks up.
@hoertlehner Hi. I recall you can force the response encoding by defining a :return
definition. E.g. with Schema add :return Long
to the route. Also validates the response
If you don't want the response validation & swagger docs, you can either a) encode it manually b) add a hint to response that it needs to be encoded
By default, only collections are auto-encoded.
Oh nice!!!
It is working!
I tried that before with :return {:result Long}
but obviously that meant I return a map with :result property of Type Long.
🙂
THANK YOU SO MUCH!!