CrossClj

0.26.1 docs

SourceDocs



RECENT
    VARS
    coerce
    coerce!
    describe
    error?
    field
    named-schema?

    « Index of all namespaces of this project

    (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
    (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
    (describe schema desc & kvs)
    Attach description and possibly other meta-data to a schema.
    
    (error? x)
    Checks whether input is an Schema error.
    
    (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.
    (named-schema? x)
    Checks whether input is a named schema.