clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
abdullahibra 2020-04-01T15:34:21.031Z

Hi everyone,

abdullahibra 2020-04-01T15:34:38.031500Z

is there a way to convert json schema into clojure spec in dynamic way ?

abdullahibra 2020-04-01T15:35:48.032700Z

what i mean by dynamic here is: i read json schema files and convert them into equivalent clojure spec which could be used

Eddie 2020-04-01T15:45:04.035400Z

Depending the exact specs you need, you might be able to write a utility using spec-tools to do accomplish your goal. For examples, https://github.com/metosin/spec-tools/blob/master/docs/02_data_specs.md.

dominicm 2020-04-01T20:11:21.036500Z

I would make a single spec per schema which was a predicate which validated the data using the schema?