This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-26
Channels
- # bangalore-clj (1)
- # beginners (12)
- # boot (48)
- # cider (56)
- # clara (1)
- # cljs-dev (15)
- # clojure (455)
- # clojure-austin (2)
- # clojure-dev (33)
- # clojure-italy (26)
- # clojure-nl (6)
- # clojure-poland (10)
- # clojure-russia (23)
- # clojure-spec (33)
- # clojure-uk (62)
- # clojurescript (37)
- # code-art (2)
- # cursive (12)
- # datomic (48)
- # funcool (1)
- # juxt (16)
- # leiningen (13)
- # off-topic (12)
- # om (23)
- # onyx (16)
- # other-lisps (5)
- # parinfer (2)
- # pedestal (28)
- # re-frame (60)
- # reagent (8)
- # ring (1)
- # ring-swagger (15)
- # spacemacs (5)
- # specter (53)
- # test-check (2)
- # unrepl (8)
- # vim (14)
shipped both [metosin/compojure-api "1.1.11"]
& [metosin/compojure-api "2.0.0-alpha6"]
, with the s/Num
coercion, updated deps & spec coercion does s/unform
too.
Is it possible to change the Swagger basePath at runtime? I am able to define it in the api declaration (def myapi (api {:swagger {:data {:basePath "/xxx"}}} …)
, but I wonder if I can change it somehow. Changing myapi
to a defn is not an option.
@psalaberria002 yes you can override everything at runtime.
via middleware?
compojure-api “1.1.10”
ok, there is ring.swagger.middleware/wrap-swagger-data
which can be used to inject swagger data in.
the api
puts the whole (statically defined) swagger-data into request under a special key, the swagger-endpoints read that + direct options and merge them together.
hello everyone i have some doubts on how to generate proper documentation using spec this spec
(s/def ::non-empty-string (s/and st/string? #(> (count %) 0)))
generate this swagger doc
{ "holdersName": {} }
is there a way to indicate that i want this to be documented as a string?@plins s/and
is fixed in the latest spec-tools snapshot, see https://github.com/metosin/spec-tools/blob/master/CHANGELOG.md#031-snapshot
yeah, snapshot only. I'll push it out when at laptop. The automatic type resolution rules are here: https://github.com/metosin/spec-tools/blob/master/src/spec_tools/type.cljc