Fork me on GitHub
#ring-swagger
<
2017-07-18
>
plins15:07:04

are the swagger docs working with spec endpoints?

plins17:07:06

route parameters are not being shown 😞

bja18:07:53

according to the latest CHANGELOG.md, they are not fully supported yet

bja18:07:45

err, my bad. I wasn't looking at the latest

bja18:07:03

as of 2.0.0-alpha5 (2.7.2017) it appears that this is supported

plins18:07:09

i must be doing something wrong then 😕

bja20:07:27

I mean, the support just recently appeared. some debugging might be in order

plins21:07:01

2.0 changed the :return behaviour? i think this should throw an error

(def routes
  (api/context "/" []
    :coercion :spec

    (api/POST "/user" []
      :return (s/keys :req-un [::customerId]
                      :opt-un [::creditCardId])
      (res/created "" {:customerIdX "abc" }))))
im stating that customerId is required in the response and im not returning it, um returning :customerIdX instead