Fork me on GitHub
#ring-swagger
<
2016-01-28
>
sooheon00:01:51

Hey guys, a question about how to use this library: I was looking through some example code and saw that there were api route definitions that looked like

(GET* "/current-user" {current-user :current-user}
                  (if current-user
                    (ok (user/sanitize-for-public current-user))
                    (ok)))
, specifically the args appeared to be some kind of destructuring. But when I look at where this api route is called, there are no args given. In the official example repo, all of the args lists are empty. Where does it take the argument to destructure from?

jstokes14:01:20

does anyone have an example using ring-swagger and http-kit? specifically the async/channel based server

ikitommi15:01:02

@sooheon it is the compojure destructuring syntax, described in here: https://github.com/weavejester/compojure/wiki/Destructuring-Syntax

ikitommi15:01:14

@jstokes ring-swagger doesn't care about the server, we are mostly running on http-kit. Not sure I understood the question.