Fork me on GitHub
#ring-swagger
<
2018-11-20
>
niels08:11:43

Bumping my version now. Went back to 26 before, because of https://github.com/metosin/compojure-api/issues/398

ikitommi09:11:46

will try to investigate that this week

niels14:11:25

will report back when I have time to test the custom printer

niels14:11:00

but for now I've got a short question: is there some way to get parameter descriptions in swagger-ui. Like how with schema-core you could do :query-params [foo :- (describe schema-core/Str "Description of foo")]

ikitommi14:11:57

@nmdrenard wrap into st/spec and add :description to the data. All keys namespaces with json-schema and swagger will contribute also to docs.

ikitommi15:11:30

(swagger/transform
  (st/spec
    {:spec integer?
     :name "integer"
     :description "it's an int"
     :swagger/default 42}))
; {:type "integer"
;  :title "integer"
;  :description "it's an int"
;  :default 42}

👍 4
niels15:11:33

"it's just data!" real nice. Thanks for the help again

ikitommi15:11:30

(swagger/transform
  (st/spec
    {:spec integer?
     :name "integer"
     :description "it's an int"
     :swagger/default 42}))
; {:type "integer"
;  :title "integer"
;  :description "it's an int"
;  :default 42}

👍 4
niels15:11:20

Works like a charm! Now to turn all my specs into data-specs...