Fork me on GitHub
#ring-swagger
<
2018-03-23
>
ikitommi11:03:54

@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)))

ikitommi11:03:59

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.

jmckitrick13:03:12

What was the problem with that approach? @ikitommi

mgrbyte14:03:02

@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:

jmckitrick18:03:10

What do you all know about ‘pact’ testing?