Fork me on GitHub
#ring-swagger
<
2018-10-22
>
petr.mensik14:10:59

Is there a way how to ensure that some middleware is always called as a first one? I want to use this middleware which transforms data from API Gateway to Compojure API inside AWS Lambda function - and the docs specifically says that this middleware has to be first https://github.com/mhjort/ring-apigw-lambda-proxy

petr.mensik14:10:45

I would also appreciate any other hints about integration of Lambda and compojure-api, just started to do it and it seems like it won't be that easy 🙂

ikitommi14:10:09

@petr.mensik wrap the top-level handler into the mw, e.g. (wrap-apigw-lambda-proxy app) where the app is you normal ring-app.

petr.mensik14:10:46

@ikitommi nice, thanks 🙂

ikitommi20:10:06

[metosin/compojure-api "2.0.0-alpha27"] is out with the new spec-tools & coercion, e.g. > Better spec coercion via st/coerce using spec walking & inference: many simple specs (core predicates, spec-tools.core/spec, s/and, s/or, s/coll-of, s/keys, s/map-of, s/nillable and s/every) can be transformed without needing spec to be wrapped. Fallbacks to old conformed based approach.