(assoc ?schema key value)(assoc ?schema key value options)Like [[clojure.core/assoc]], but for LensSchemas.
Like [[clojure.core/assoc]], but for LensSchemas.
(assoc-in ?schema ks value)(assoc-in ?schema [k & ks] value options)Like [[clojure.core/assoc-in]], but for LensSchemas.
Like [[clojure.core/assoc-in]], but for LensSchemas.
(closed-schema ?schema)(closed-schema ?schema options)Closes recursively all :map schemas by adding {:closed true}
property, unless schema explicitely open with {:closed false}
Closes recursively all :map schemas by adding `{:closed true}`
property, unless schema explicitely open with `{:closed false}`(dissoc ?schema key)(dissoc ?schema key options)Like [[clojure.core/dissoc]], but for MapSchemas.
Like [[clojure.core/dissoc]], but for MapSchemas.
(distinct-by f coll)Returns a sequence of distinct (f x) values)
Returns a sequence of distinct (f x) values)
(find ?schema k)(find ?schema k options)Like [[clojure.core/find]], but for MapSchemas.
Like [[clojure.core/find]], but for MapSchemas.
(find-first ?schema f)(find-first ?schema f options)Prewalks the Schema recursively with a 3-arity fn [schema path options], returns with and as soon as the function returns non-null value.
Prewalks the Schema recursively with a 3-arity fn [schema path options], returns with and as soon as the function returns non-null value.
(from-map-syntax m)(from-map-syntax {:keys [type properties children] :as m} options)(get ?schema k)(get ?schema k default)(get ?schema k default options)Like [[clojure.core/get]], but for LensSchemas.
Like [[clojure.core/get]], but for LensSchemas.
(get-in ?schema ks)(get-in ?schema ks default)(get-in ?schema [k & ks] default options)Like [[clojure.core/get-in]], but for LensSchemas.
Like [[clojure.core/get-in]], but for LensSchemas.
(in->paths schema in)Returns a vector of schema paths for a given Schema and value path
Returns a vector of schema paths for a given Schema and value path
(merge ?schema1 ?schema2)(merge ?schema1 ?schema2 options)Merges two schemas into one with the following rules:
nil, the other one is used, regardless of value:merge-entries fn is used (default last one wins):merge-default fn is used (default last one wins)| key | description |
|---|---|
:merge-default | schema1 schema2 options -> schema fn to merge unknown entries |
:merge-required | boolean boolean -> boolean fn to resolve how required keys are merged |
Merges two schemas into one with the following rules: * if either schemas is `nil`, the other one is used, regardless of value * with two :map schemas, both keys and values are merged * for :and schemas, the first child is used in merge, rest kept as-is * with two :map entries, `:merge-entries` fn is used (default last one wins) * with any other schemas, `:merge-default` fn is used (default last one wins) | key | description | ------------------|------------- | `:merge-default` | `schema1 schema2 options -> schema` fn to merge unknown entries | `:merge-required` | `boolean boolean -> boolean` fn to resolve how required keys are merged
(open-schema ?schema)(open-schema ?schema options)Opens recursively all :map schemas by removing :closed
property, unless schema explicitely open with {:closed false}
Opens recursively all :map schemas by removing `:closed`
property, unless schema explicitely open with `{:closed false}`(optional-keys ?schema)(optional-keys ?schema ?keys)(optional-keys ?schema keys options)Makes map keys optional.
Makes map keys optional.
(path->in schema path)Returns a value path for a given Schema and schema path
Returns a value path for a given Schema and schema path
(rename-keys ?schema kmap)(rename-keys ?schema kmap options)Like [[clojure.set/rename-keys]], but for MapSchemas. Collisions are resolved in favor of the renamed key, like assoc-ing.
Like [[clojure.set/rename-keys]], but for MapSchemas. Collisions are resolved in favor of the renamed key, like `assoc`-ing.
(required-keys ?schema)(required-keys ?schema ?keys)(required-keys ?schema keys options)Makes map keys required.
Makes map keys required.
(select-keys ?schema keys)(select-keys ?schema keys options)Like [[clojure.core/select-keys]], but for MapSchemas.
Like [[clojure.core/select-keys]], but for MapSchemas.
(subschemas ?schema)(subschemas ?schema options)Returns all subschemas for unique paths as a vector of maps with :schema, :path and :in keys.
Walks over :schema references and top-level :refs. See malli.core/-walk for all options.
Returns all subschemas for unique paths as a vector of maps with :schema, :path and :in keys. Walks over :schema references and top-level :refs. See [[malli.core/-walk]] for all options.
(transform-entries ?schema f)(transform-entries ?schema f options)Transforms entries with f.
Transforms entries with f.
(union ?schema1 ?schema2)(union ?schema1 ?schema2 options)Union of two schemas. See merge for more details.
Union of two schemas. See [[merge]] for more details.
(update schema key f & args)Like [[clojure.core/update]], but for LensSchema instances.
Like [[clojure.core/update]], but for LensSchema instances.
(update-in schema ks f & args)Like [[clojure.core/update-in]], but for LensSchemas.
Like [[clojure.core/update-in]], but for LensSchemas.
(update-properties ?schema f & args)Returns a Schema instance with updated properties.
Returns a Schema instance with updated properties.
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 |