(infer params & docs)
Schema inference from multiple documents of associative data. Takes n sample documents as input, and returns a schema that allows only data represented in at least one of the documents.
Data that is present in all documents will be required. Data only represented in a subset of documents will be optional. Data not represented at all, will not be allowed.
If a single document is passed, infer-strict is used directly.
Params: title - schema title description - schema description uri - schema uri schema - continue building on schema optional - keys that shouldn't be required nullable - optionality by nullability
Schema inference from multiple documents of associative data. Takes n sample documents as input, and returns a schema that allows only data represented in at least one of the documents. Data that is present in all documents will be required. Data only represented in a subset of documents will be optional. Data not represented at all, will not be allowed. If a single document is passed, infer-strict is used directly. Params: title - schema title description - schema description uri - schema uri schema - continue building on schema optional - keys that shouldn't be required nullable - optionality by nullability
(infer->json params data)
A helper function that returns inferred schema as JSON
A helper function that returns inferred schema as JSON
(infer-strict {:keys [title schema optional] :as params} data)
Naive but strict schema inference from associative data. Strict in the sense that everything is required, and nothing else is allowed.
Params: optional - keys that shouldn't be required
Optional params: title - schema title description - schema description uri - schema uri schema - continue building on schema
Naive but strict schema inference from associative data. Strict in the sense that everything is required, and nothing else is allowed. Params: optional - keys that shouldn't be required Optional params: title - schema title description - schema description uri - schema uri schema - continue building on schema
(key-paths m)
Returns a sequence of all key paths in a given map using DFS walk. Converts lists to vectors to enable associative lookup.
Based on code from: https://dnaeon.github.io/clojure-map-ks-paths/
Returns a sequence of all key paths in a given map using DFS walk. Converts lists to vectors to enable associative lookup. Based on code from: https://dnaeon.github.io/clojure-map-ks-paths/
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close