This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-19
Channels
- # aws-lambda (1)
- # beginners (35)
- # cider (7)
- # cljsjs (2)
- # clojure (48)
- # clojure-austria (1)
- # clojure-conj (9)
- # clojure-dev (8)
- # clojure-india (6)
- # clojure-italy (12)
- # clojure-nl (8)
- # clojure-norway (3)
- # clojure-spec (9)
- # clojure-uk (92)
- # clojurescript (103)
- # community-development (7)
- # cursive (15)
- # datomic (75)
- # devcards (3)
- # emacs (3)
- # events (1)
- # fulcro (129)
- # hoplon (4)
- # immutant (2)
- # jobs (10)
- # leiningen (9)
- # off-topic (4)
- # onyx (2)
- # re-frame (45)
- # reagent (39)
- # reitit (40)
- # remote-jobs (4)
- # ring (2)
- # ring-swagger (9)
- # shadow-cljs (17)
- # tools-deps (31)
Having some difficulty, I want to disable YAML in body-param input. This is a project using compojure-api 1.2.0-alpha4
In my call to compojure.api.sweet/api
my options include :formats (dissoc (:formats (:formats compojure.api.api/api-defaults)) "application/x-yaml")
to try to get the relevant portions of the muntaaja setup in defaults but the swagger page still accepts yaml inputs and attempts to decode it. Other :formats
values, like those in the doc-string of compojure.api.sweet/api
, don't work at all and result in runtime exceptions. (The documentation shows :formats [:json-kw :edn :transit-msgpack :transit-json]
). Any pointers here?
@dave.tenny the docs-string was fixes just few days ago. I would recommend to update to 2.0.0-alpha20
and use something like :formats (update m/default-formats :formats dissoc "application/x-yaml")
Hey how can I set the content-type header when using compojure api?
with swagger.
@andreasp1994 it's normal ring, so for example (content-type (ok "{\"a\": 1}") "application/json")
should do it
Thanks!
Is is possible to use compojure 2 without muutanja ??
Or integrating with https://github.com/cognitect/transit-clj