This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-14
Channels
- # admin-announcements (2)
- # beginners (32)
- # boot (217)
- # cider (20)
- # cljsjs (25)
- # cljsrn (9)
- # clojure (87)
- # clojure-android (7)
- # clojure-austin (4)
- # clojure-belgium (10)
- # clojure-canada (13)
- # clojure-dev (28)
- # clojure-dusseldorf (2)
- # clojure-greece (119)
- # clojure-nl (1)
- # clojure-russia (22)
- # clojure-spain (3)
- # clojure-spec (81)
- # clojure-uk (54)
- # clojurescript (32)
- # community-development (2)
- # core-async (19)
- # cursive (18)
- # datascript (5)
- # datomic (1)
- # dirac (22)
- # emacs (22)
- # hoplon (198)
- # incanter (1)
- # instaparse (4)
- # jobs (3)
- # keechma (15)
- # ldnclj (2)
- # lein-figwheel (14)
- # mount (8)
- # om (78)
- # om-next (4)
- # onyx (37)
- # other-languages (1)
- # pedestal (6)
- # re-frame (22)
- # reagent (25)
- # ring-swagger (17)
- # robots (1)
- # slack-help (1)
- # spacemacs (7)
- # specter (50)
- # spirituality-ethics (3)
- # uncomplicate (5)
- # untangled (1)
- # yada (17)
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 - https://github.com/metosin/ring-swagger/blob/master/CHANGELOG.md#0229-1462016
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)
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 -> https://github.com/metosin/compojure-api/issues/48 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: https://github.com/metosin/compojure-api/blob/master/src/compojure/api/core.clj#L32
@juhoteperi: is there an example for the same that I can refer?
@udit: Hmm, no