(interaction-validator {:keys [uri-prefix specification] :as context})
(validator-context specification opts)
Create a new validator context from the given specification
.
opts
is a map of options (or nil).
Available options:
:format-predicates, a map of format values to format predicates,
for validation. When provided, validates instances according to the
format predicates. Default is nil
. Use
nl.jomco.openapi.v3.validator.json-schema-validator/format-predicates
to enable validation of format specs.
:numeric-coercion, a function to coerce collections and scalars
for comparing validations (enum, const, multiple-of and
unique). Default is
nl.jomco.openapi.v4.validator.json-coerce/json-coerce
, which
treats all numbers as BigDecimals (so instance 10.0
is valid
according to {"const": 10}
. Use identity
to use Clojure
semantics (where instance [1, 1.0]
is valid according to
{"uniqueItems": true}
).
Create a new validator context from the given `specification`. `opts` is a map of options (or nil). Available options: - :format-predicates, a map of format values to format predicates, for validation. When provided, validates instances according to the format predicates. Default is `nil`. Use `nl.jomco.openapi.v3.validator.json-schema-validator/format-predicates` to enable validation of format specs. - :numeric-coercion, a function to coerce collections and scalars for comparing validations (enum, const, multiple-of and unique). Default is `nl.jomco.openapi.v4.validator.json-coerce/json-coerce`, which treats all numbers as BigDecimals (so instance `10.0` is valid according to `{"const": 10}`. Use `identity` to use Clojure semantics (where instance `[1, 1.0]` is valid according to `{"uniqueItems": true}`).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close