Closed piotr-yuxuan closed 1 year ago
Spec support is definitely something I want to add. Your approach looks great and matches the rest of the project well. One minor naming preference: Let's make the top-level function name simply "spec". That matches the rest of the fn names. Usage would be:
(require '[deercreeklabs.lancaster :as l])
(def sch (l/map-schema l/int-schema))
(l/spec sch)
I have held off because I have some complaints about spec's current form. It sounds like some changes are coming to spec that will likely resolve those complaints. Let's wait until we see what spec alpha 2 brings, then implement this.
So I'll wait for changes in spec.
Update: I've written a draft avro->spec project here: https://github.com/piotr-yuxuan/dove. Do you think it could be easily melt into lancaster? Just feel free to criticize it or point out anything I would have missed.
Hi Piotr, I am in the process of making some changes to lancaster to make it work better with specs. Once I finish that; I will look more closely at dove and other options for generating specs.
Thanks for your efforts, Chad
This PR is out of date; I will close now.
I'm thinking about adding Clojure(Script) support in
lancaster
as well as you've got Prismatic schemas withdeercreeklabs.lancaster.utils/edn-schema->plumatic-schema
. This first commit (with no tests) is a bare wireframe for the implementation I'm thinking about.I'd be more than delighted to get some feedback about that, be it positive or negative. What do you think of the suggested implementation? Anything better / any possible refactoring? Can it work and be useful?