Fork me on GitHub
#ring-swagger
<
2017-12-26
>
wontheone116:12:15

Hello, while trying to use compojure-api, I have a question about exactly how to use this. In readme there is some examples,

wontheone116:12:42

I assumed these are interchangeable alternatives. I want to use the data-driven approach (the first one). but there is no "path" (like "/hello-async") in the second example. I'd like an example with data-driven approach where a path is included, if possible please 🙂

wontheone116:12:50

Thank you in advance!

wontheone118:12:45

I found how to add paths in data-driven way 🙂 they had to be nested in context as in https://github.com/metosin/compojure-api/blob/master/examples/resources/src/example/handler.clj

wontheone119:12:18

Hi, I was testing a Get endpoint made with compojure-api with Midje & Ring mock. I found something weird.

wontheone119:12:34

Here I am expecting JSON in :body but I am getting inputstream. Also :compojure.api.meta/serializable? true part is not something I am expecting... Though when I make http calls with POSTMAN(curl substitute) then I get expected response. Is this expected behavior?

wontheone119:12:03

I would like to know how do you test endpoints by compojure-api in real world applications...

wontheone123:12:58

about inputstream in body, I forgot that I had to slurp (because with techstack I use in my company, the body is already string without slurp, so I never had to slurp the body in tests). Now that I slurp and parse-string the body is as expected. but still I wonder what's the purpose of :compojure.api.meta/serializable? true