yada

rlander 2019-04-16T16:27:14.000900Z

Does yada use spec? The docs only mention schema.

malcolmsparks 2019-04-16T16:27:59.001800Z

It doesn't use spec. At least not for params validation

rlander 2019-04-16T16:29:52.002400Z

😢

rlander 2019-04-16T16:30:21.003Z

any plans on supporting spec? I'd rather not tie my code to an almost deprecated lib

rlander 2019-04-16T16:30:31.003200Z

but I think yada is pretty cool

rlander 2019-04-16T16:30:41.003500Z

I'd love to use it

malcolmsparks 2019-04-16T16:32:32.005300Z

There's some debate about whether spec is suitable for params validation. There are other candidates. We've been thinking and talking about this a lot recently.

mccraigmccraig 2019-04-16T16:32:53.005700Z

what are the other candidates @malcolmsparks?

rlander 2019-04-16T16:34:17.006900Z

Don't get me wrong, I was a fan of schema for params validation (not really a fan of spec), but I think it's too risky now to use schema. What are the other candidates?

dominicm 2019-04-16T16:36:11.007900Z

For some interfaces, tools like vlad are candidates (forms), json schema direct is another thing we have discussed.

dominicm 2019-04-16T16:38:07.009200Z

I think it's a mistake to consider schema nearly deprecated. It's still a really good library, and it's well maintained.

mccraigmccraig 2019-04-16T17:10:12.011400Z

JSON schema validation would not help with coercion would it @dominicm?

mccraigmccraig 2019-04-16T17:10:26.011800Z

although you would perhaps get much nicer swagger ?

dominicm 2019-04-16T18:03:12.012300Z

Perhaps not. But one might not want that.

mccraigmccraig 2019-04-16T18:27:08.013800Z

some might not - i definitely do - there's a mismatch between JSON primitive types and those most dbs support (in particular, uuids, dates, timestamps) which is nicely bridged by coercion

dominicm 2019-04-16T19:13:18.015400Z

I have no idea if JSON schema could support that via parsing, it's shown to be a versatile format. To be clear, yada is not dropping schema.

mccraigmccraig 2019-04-16T19:44:34.015600Z

:thumbsup:

dominicm 2019-04-16T20:05:06.017700Z

On that note, my previous discouragement of specv1 for use on external boundaries is being challenged for specv2 with the introduction of closed specs. http://insideclojure.org/2019/04/14/journal/ Closed specs may resolve the 2 issues that are introduced by specs on boundaries which may be attacked by a hostile: 1. Only checking a subset of keys, so reduced opportunity for an attacker to exploit a spec 2. Extra keys with the intention of them getting into the database

dominicm 2019-04-16T20:05:11.018Z

Something to watch.