Liking cljdoc? Tell your friends :D

d-core.core.schema

Schema helpers for D-core.

This module is intentionally small:

  • Applies strictness (:strict/:lax) to Malli map schemas (:closed true/false)
  • Validates values and throws typed, non-retriable exceptions for poison handling.
Schema helpers for D-core.

This module is intentionally small:
- Applies strictness (:strict/:lax) to Malli map schemas (:closed true/false)
- Validates values and throws typed, non-retriable exceptions for poison handling.
raw docstring

apply-strictnessclj

(apply-strictness schema strictness)

Applies :strict/:lax strictness to all Malli :map schemas by setting :closed.

Applies :strict/:lax strictness to all Malli :map schemas by setting :closed.
raw docstring

explainclj

(explain schema value)

Returns a compact explain payload safe to include in ex-data / DLQ. Includes both raw explain and humanized errors.

Returns a compact explain payload safe to include in ex-data / DLQ.
Includes both raw explain and humanized errors.
raw docstring

validate!clj

(validate! schema value)
(validate! schema value {:keys [schema-id strictness]})

Validates value against schema (optionally applying strictness).

On failure, throws ex-info with:

  • :failure/type :schema-invalid
  • :retriable? false
  • :schema/id (optional)
  • :schema/explain (compact explain payload)
Validates `value` against `schema` (optionally applying `strictness`).

On failure, throws ex-info with:
- :failure/type :schema-invalid
- :retriable? false
- :schema/id (optional)
- :schema/explain (compact explain payload)
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close