Fork me on GitHub
#ring-swagger
<
2017-12-11
>
Drew Verlee00:12:52

Is there a way to specify a request example to the swagger api? Hm, ok yea, thats its own library, cool. I can probably figure this out.

ikitommi05:12:35

You can attach any extra keys with namespace json-schema to the spec records and they are written to api-docs. e.g.

(s/def ::int
  (st/spec
      {:spec integer?
       :name "integer"
       :description "it's an int"
       :json-schema/default 42
       :json-schema/example 99}))