ring-swagger

ring-swagger & compojure-api
ikitommi 2018-03-23T11:08:54.000158Z

@jmckitrick closures in the top-level like this:

(defn app [{:keys [db] :as system}]
  (api
    (GET "/users" [] (ok (user/get-users db))
    (more-routes system)))

ikitommi 2018-03-23T11:09:59.000368Z

old way was to add :components into api-options and use the :components to extract that at runtime. I think we could remove that for 2.0.0 as a not-good-idea.

jmckitrick 2018-03-23T13:41:12.000352Z

What was the problem with that approach? @ikitommi

mgrbyte 2018-03-23T14:42:02.000271Z

@ikitommi wanting to pick your brains; I keep thinking that in #compojure-api 2.+, defaults for :compojure.api.exception/request-validation should be 400 not 500, since if one specifies a spec/schema for e.g: :query-params and they fail to validate, i think that's a client error? thinking that default of 500 for :compojure.api.exception/response-validation makes sense, since the server is always responsible for the response... except that if you want to attach the failing spec for validation-error to the response.... :thinking_face:

jmckitrick 2018-03-23T18:00:10.000848Z

What do you all know about ‘pact’ testing?