Fork me on GitHub
#ring-swagger
<
2016-02-09
>
piotrek07:02:39

Thanks for the great compojure-api library simple_smile

piotrek07:02:28

I have a question about defining an endpoint for file downloads - what kind of :return type should I use for binary downloads?

piotrek07:02:39

hmm, ok, I will try it

piotrek07:02:49

I didn’t expected it simple_smile

juhoteperi07:02:07

Setting any :return will enable output coercion which is not wanted in such case

piotrek07:02:18

I see - thanks for explanation

ikitommi07:02:46

cleaned up wiki bit for 1.0.0 changes. Still lot to do..

timgilbert18:02:44

Hey, I'm having a heck of a time exposing an "application/edn" endpoint with compojure-api 0.24.5, I keep getting a nil body which then fails schema validation

timgilbert18:02:12

I'm trying to develop a minimal example, but are there any outstanding issues around EDN parsing?

ikitommi20:02:50

@timgilbert hi, dont know of any issues.

ikitommi20:02:31

could you paste a snipplet?

timgilbert20:02:22

Thanks @ikitommi... So far the minimal samples I've worked up all work correctly, so I think the problem is somewhere in my application code. I'll dig around some more and let you know if I can find something reproducable

ikitommi20:02:11

ok. just tested with the template project, works ok:

curl -X POST --header 'Content-Type: application/edn' --header 'Accept: application/edn' -d '{:name "string", :description "string", :size :L, :origin {:country :PO, :city "string"}}' ''
{:name "string", :description "string", :size :L, :origin {:country :PO, :city "string”}}

ikitommi20:02:07

are you using custom edn-records? those need the :readers

ikitommi20:02:09

same as in transit, we should bundle with a set of readers & writers that cover all the common classes.

ikitommi20:02:05

waiting to finalize the web-schemas some day, would do just that (https://github.com/metosin/web-schemas)

ikitommi20:02:33

have to go, hopefully you can isolate that

timgilbert20:02:43

Cool, thanks for the sugestions