This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-12
Channels
- # admin-announcements (3)
- # announcements (1)
- # beginners (9)
- # boot (85)
- # bristol-clojurians (4)
- # cider (12)
- # cljs-dev (3)
- # clojure (91)
- # clojure-berlin (7)
- # clojure-dev (16)
- # clojure-italy (21)
- # clojure-russia (67)
- # clojure-spain (3)
- # clojure-uk (6)
- # clojurescript (139)
- # core-async (41)
- # cursive (7)
- # datomic (61)
- # editors (56)
- # events (16)
- # hoplon (11)
- # jobs (4)
- # ldnclj (14)
- # liberator (7)
- # off-topic (13)
- # om (5)
- # re-frame (22)
- # ring-swagger (27)
Can't find documentation or tests in compojure-api describing :headers
in :responses
. Just a vector of strings or keywords, perhaps? What should be expected if response has or hasn't the headers?
@ulsa: :headers
works just like :body
, it takes binding symbol and schema
:responses
should map of status code to map containing keys :body and optionally :description
Am I looking at the correct docs?
"Key :responses takes a map of http-status-code to schema-definitions map (with optional :schema, :description and :headers keys)."
Says nothing of what :headers
should look like. No examples, no tests.
:headers [headers {:header-a s/Str :header-b s/Keyword}]
or I guess you mean the :headers
key inside :responses
It should be a schema: https://github.com/metosin/ring-swagger/blob/e2b43eda530a70b2d6ecf24ef79cf3bfca98ccd7/test/ring/swagger/swagger2_test.clj#L114
and I would say it’s only used for swagger docs, no validation
Yes, it seems no validation occurs. I don't see anything in swagger-ui under headers, though.
Swagger-ui doesn’t necessarily support full Swagger-spec
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#fixed-fields-10
Or could be we are formatting them wrong
Looks like Swagger-spec examples don’t have example of response headers either
Looks like there is a bug with Swagger-ui: https://github.com/swagger-api/swagger-ui/issues/1117
Looks like a bug with c-api. Would be nice if you could open an issue.