Fork me on GitHub
#reitit
<
2018-11-24
>
valerauko09:11:40

now i'm getting the same problems: [] thing on another route

valerauko09:11:03

it seems to be caused by something in the request but since it doesn't tell me what's wrong i can't debug it

valerauko09:11:35

:parameters {:body {:id any?
                                :object any?
                                :type any?
                                :actor any?}}

valerauko09:11:20

{:problems [],
 :value nil,
 :type "reitit.coercion/request-coercion",
 :spec
 "(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:spec$54129/id :spec$54129/object :spec$54129/type :spec$54129/actor]), :type :map, :spec-tools.parse/key->spec {:id :spec$54129/id, :object :spec$54129/object, :type :spec$54129/type, :actor :spec$54129/actor}, :spec-tools.parse/keys #{:type :id :object :actor}, :spec-tools.parse/keys-req #{:type :id :object :actor}})",
 :coercion "spec",
 :in ["request" "body-params"]}

ikitommi09:11:48

@vale could you do a minimalistic snippet, could investigate

valerauko09:11:00

i'm trying that right now

valerauko09:11:10

i'll get back to you when/if i have anything usable

valerauko10:11:17

the body was apparently empty

ikitommi10:11:58

oh, yes, the :value. Have you tried the dev middleware / Interceptors? Log the diffs between steps, makes things more visible

valerauko10:11:00

i didn't know about that

valerauko10:11:22

are there docs on those?

ikitommi10:11:38

uh, no, but here's a sample project with that on (by accident).

valerauko10:11:04

ok i'll check it out

ikitommi10:11:48

Idea: as the Middleware, Interceptors & Controllers are just data, it would be easy to add specific logic for different profiles (production|development). E.g. the dev-middleware chain transformer could use the mw-spesific code if it exists, .e.g. :dev/before and :dev/after keys in the mw. The content negotiation middleware could print in plain (expound-style) english what it did or didn’t.

👍 4
ikitommi10:11:42

or just :dev/wrap to override the :wrap in dev-mode… hmm.