Fork me on GitHub
#portkey
<
2017-09-09
>
cgrand08:09:41

Considerations on awsgen the when form starting on this line https://github.com/portkey-cloud/aws-clj-sdk/blob/master/src/portkey/awsgen.clj#L242 has to grow from scratch for each protocol to be sure that every case is covered.

cgrand08:09:56

Second, the conforming aspects of specs may be too much. Validation and transformation to a model of the message may have to be split.

viesti20:09:10

user> (defn plus [data] (apply + (-> data :numbers)))
#‘user/plus
user> (plus {:numbers [1 2 3]})
6
user> (pk/mount! plus “/plus” :method :post)
Zip size 5.6MB
{:url “}

> curl -H “Content-Type: application/json” -X POST -d ‘{“numbers”: [1, 2, 3]}’ 
> 6

viesti20:09:46

did another try at POST support, ditched earlier branch and started anew

viesti20:09:12

there’s duplication on the swagger definition side, but that will become better

viesti20:09:40

still on the “simplest way to get arguments to a function” path, but introduction of ring (or something like it) would bring more rigour, I think