Liking cljdoc? Tell your friends :D

duckula.avro


*default-extension*clj

source

*default-path*clj

source

avro-schema->-schema-schema*clj

source

load-schemasclj

(load-schemas & schemas)
source

make-validatorclj

(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:

  • 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
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
sourceraw docstring

name->pathclj

(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*`
sourceraw docstring

validate-with-schemaclj

(validate-with-schema schema input)
source

validatorclj

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close