Fork me on GitHub

Hey folks! I am using swagger for mostly documenting my APIs. I have turned off the coercion using the :coercion tag. However I am running into problems with APIs that have caching enabled.


These cache enabled APIs return a response code of 304 with no body, but apparently swagger doesn’t allow non empty body response for my configuration. Any pointers?


@udit: hi, you can define the response to be s/Any. Something like :responses {200 {:schema Response}, 304 {:schema s/Any}}


Pushed out ring-swagger 0.22.9. Updated to ring 1.5.0 & some small fixes for nil handling & schema meta-data -


pushed also new version of compojure-api, just with fresh dependencies (ring 1.5.0, ring-http-response 0.7.0 & the new ring-swagger)


is there a simple way to make ring-swagger work with records for coercion ?


atm I have to define my schemas with s/defschema then convert into records but schema also has s/defrecord


Hi @ikitommi. I wanted to know is there a way to include plain compojure routes (declared by compojure.core/defroutes) into the compojure.api.routes.Route


Nevermind I got it from the issues list -> Thanks! @ikitommi


@udit: That has changed since then, you can now just directly put those plain compojure routes into c-api defroutes


Though then c-api will warn you that the routes are undocumented, but you can wrap them with undocumented to remove the warning:


@juhoteperi: is there an example for the same that I can refer?


any rough ETA for spec conformance? weeks,months, years?


@shem: I'd say months (= after vacations). Many ways to conform... Did a spike on coverting specs into Schemas, works for simple cases and could give best of both worlds: proven and fast coercions, non-breaking contracts with existing clients.


contributions to pure spec version welcome!


ok, good to know. not really competent enough to contribute at this point but i'll go ahead with schema with a new project and then convert when spec support comes along. would be nice to help of course. i'll keep an eye on the effort and help if there's something i might manage.