I don’t understand the need for req
and resp
, their responsability
specs don’t transform
ser
(resp. deser
) transforms to (resp. from) conforming value (eg take care of lifting collapsed lists from HAL) — these transformations are local
req
takes whatever ser
on the root shape produced and creates a request (it may imply moving things around, out of the body to a header oa a query param) — these transformations are global
resp
is the mirror of req
: it takes a response, cobbles every piece of value together in a single value to pass to deser
resp -> deser+ -> conform
conform -> ser+ -> req
the +
denotes recursive call (non standard notation, yeah!)
I understand that ser
is local but req
is only protocol dependent, why creating req-*
forr every input ?
I am feeling dumb ^^
that is a recurring feeling for me too, generally
relates to grasshopping, I think
(map #(str "ser-" %) inputs)
vs (map #(str "req<-" %) input-roots)
One ser
per shape used as (part of) input but only req<-
for root input shapes (aka messages)
😄
Ok, I’ll digest that tomorrow and try to do a POC this week