Liking cljdoc? Tell your friends :D

ring.swagger.schema


coerceclj

(coerce schema value)
(coerce schema value type)

Coerces a value against a schema using a given coerser. If no errors, returns the coerced value, otherwise returns ValidationError.

Optional third parameter is a dispatch value to ring.swagger.coerce/coercer, defaults to :json

Coerces a value against a schema using a given coerser. If no errors,
returns the coerced value, otherwise returns ValidationError.

Optional third parameter is a dispatch value to ring.swagger.coerce/coercer,
defaults to :json
sourceraw docstring

coerce!clj

(coerce! schema value)
(coerce! schema value type)

Coerces a value against a schema using a given coerser. If no errors, returns the coerced value, otherwise throws a schema.utils.ErrorContainer enriched with :type ::validation.

Optional third parameter is a dispatch value to ring.swagger.coerce/coercer, defaults to :json

Coerces a value against a schema using a given coerser. If no errors,
returns the coerced value, otherwise throws a schema.utils.ErrorContainer
enriched with :type ::validation.

Optional third parameter is a dispatch value to ring.swagger.coerce/coercer,
defaults to :json
sourceraw docstring

describeclj

(describe schema desc & kvs)

Attach description and possibly other meta-data to a schema.

Attach description and possibly other meta-data to a schema.
sourceraw docstring

error?clj

(error? x)

Checks whether input is an Schema error.

Checks whether input is an Schema error.
sourceraw docstring

fieldclj

(field schema meta-data)

Attaches meta-data to a schema under :json-schema key. If the schema is of type which cannot have meta-data (e.g. Java Classes) schema is wrapped first into wrapper Schema.

Attaches meta-data to a schema under :json-schema key. If the
schema is of type which cannot have meta-data (e.g. Java Classes)
schema is wrapped first into wrapper Schema.
sourceraw docstring

named-schema?clj

(named-schema? x)

Checks whether input is a named schema.

Checks whether input is a named schema.
sourceraw docstring

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

× close