Schema helpers for D-core.
This module is intentionally small:
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.
(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.
(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.
(validate! schema value)(validate! schema value {:keys [schema-id strictness]})Validates value against schema (optionally applying strictness).
On failure, throws ex-info with:
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)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |