Re: clojure.spec - dynamic specs

2016-06-18 Thread Brian Platz
On Friday, June 17, 2016 at 4:04:31 PM UTC-4, Alex Miller wrote: > > > > On Friday, June 17, 2016 at 2:46:37 PM UTC-5, Brian Platz wrote: >> >> >> I'd like to be able to use clojure.spec for input validation where the >> specs are stored in a database using a data structure to represent them. >>

Re: clojure.spec - dynamic specs

2016-06-17 Thread Alex Miller
On Friday, June 17, 2016 at 2:46:37 PM UTC-5, Brian Platz wrote: > > > I'd like to be able to use clojure.spec for input validation where the > specs are stored in a database using a data structure to represent them. > Why don't you represent them as code loaded by different applications? s/fo

Re: clojure.spec - dynamic specs

2016-06-17 Thread Timothy Baldridge
In a multi-tenant system, perhaps you should force users to prefix specs with a namespace they own? On Fri, Jun 17, 2016 at 1:46 PM, Brian Platz wrote: > > I'd like to be able to use clojure.spec for input validation where the > specs are stored in a database using a data structure to represent

clojure.spec - dynamic specs

2016-06-17 Thread Brian Platz
I'd like to be able to use clojure.spec for input validation where the specs are stored in a database using a data structure to represent them. s/keys and its requirement to use the registry makes this challenging. I'm able to generate specs dynamically using a workaround like: (eval (cons 's/a