Fork me on GitHub
#ring-swagger
<
2017-09-27
>
daveliepmann17:09:07

I'm using plumatic/schema with compojure-api to define return types in Swagger UI. Is there a way to specify a return type of image/jpeg?

ikitommi17:09:09

@daveliepmann type java.io.File maps to swagger "file". Would that help?

daveliepmann17:09:00

@ikitommi it may; I'll try to schema-ify that

daveliepmann18:09:18

The changelog for [ring-swagger 0.23.0](https://github.com/metosin/ring-swagger/blob/725fc8cf77cb5721bc181ffbea0ba2f0e8319f14/CHANGELOG.md#0230-10220170 says Support for java.io.File return type, mapping to "file" — should this mean that literally :return "file" should work in my route?

ikitommi18:09:45

@daveliepmann The correct way to set that is :return java.io.File, or :responses {200 {:schema java.io.File}}

daveliepmann18:09:56

this is helpful—I am encountering some version issues but I think this is the right path. Thanks.