This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-29
Channels
- # aws (1)
- # aws-lambda (1)
- # beginners (34)
- # boot (61)
- # cljs-dev (126)
- # cljsjs (10)
- # cljsrn (4)
- # clojure (27)
- # clojure-russia (7)
- # clojure-spec (1)
- # clojure-uk (26)
- # clojurescript (42)
- # cursive (31)
- # datascript (4)
- # datomic (16)
- # hoplon (51)
- # klipse (1)
- # lein-figwheel (1)
- # lumo (79)
- # off-topic (16)
- # om (7)
- # parinfer (5)
- # planck (2)
- # re-frame (6)
- # reagent (3)
- # ring-swagger (5)
- # untangled (11)
Hi! In Swagger UI generated by compojure-api is there any way to set default "Response Content Type" to something other than "application/json" and ideally remove the unneeded options (e.g. x-yaml)? I've tried editing the :formats but they don't have the effect on Swagger UI:
(-> muuntaja/default-options
(update :formats dissoc "application/json")
(assoc :default-format "application/transit+json")
...
Which compojure-api version are you using?
Oh, right, 1.2 as you are using muuntaja
yep, the latest alpha
@metametadata that should do it, I'll run the code tomorrow and see myself. There is no explicit way currently to set the default format for swagger, but the formats map is small and should be a arraymap and as implementation detail - in order.