(make-validator schema {:keys [mangle-names? soft-validate?]})
Returns a validator function for given Avro schema map, single schema path, or a list of schema paths (will construct a composite schema). Attaches schema path(s) to the function as metadata Options:
Returns a validator function for given Avro schema map, single schema path, or a list of schema paths (will construct a composite schema). Attaches schema path(s) to the function as metadata Options: - mangle-names? - if set to true, it will change all _ to - in key and enum value names - soft-validate? - if set to true, it will attach a boolean flag to the function to indicate that the function user can ignore validation error and return the input data (even if invalid) This is useful, if you want to roll out validation, but not break on invalid payloads
(name->path n)
If n
is not a map - turn it into the default path to a schema file
as defined by the prefix *default-path*
and extension *default-extension*
If `n` is not a map - turn it into the default path to a schema file as defined by the prefix `*default-path*` and extension `*default-extension*`
(validator schema)
(validator schema opts)
Creates a validator function for given schema paths.
Will resolve these names to resource paths.
schema-name-or-names
can be a string or list of strings.
See make-validator
for options explanation
Creates a validator function for given schema paths. Will resolve these names to resource paths. `schema-name-or-names` can be a string or list of strings. See `make-validator` for options explanation
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close