Liking cljdoc? Tell your friends :D

bling.explain


common-root-path-maxclj/s

(common-root-path-max paths)
source

error-summaryclj/s

(error-summary m)
source

explain-malliclj/smacro

(explain-malli schema v)
(explain-malli schema v opts)

Prints a Malli validation error "callout" block via bling.core/callout.

Within the block, the value is pretty-printed, potentially with syntax coloring. The problem value is highlighted with the :highlight-error class of the active fireworks theme, or the :highlight-error-underlined class, if the value is not a collection.

If three arguments are provided, the third should be a map with the following optional keys:

  • :function-name

    • string?
    • Optional.
    • The name of the function that can be used to construct the source location.
  • :spacing

    • #{"compact" :compact}
    • Optional.
    • If the value of :spacing is set to :compact, the callout is compacted vertically.
  • :display-schema?

    • boolean?
    • Optional.
    • Displays the schema passed to the underlying call to malli.core/explain.
  • :display-explain-data?

    • boolean?
    • Optional.
    • Displays the output of malli.core/explain within the callout block.
  • :callout-opts

    • map?
    • Optional.
    • A map of options for the underlying call to bling.core/callout.
  • :hifi-opts

    • map?
    • Optional.
    • The options map for bling.hifi/hifi
  • :file

    • string?
    • Optional.
    • The file name of the call site. This value be automatially supplied by the macro, so only use if you want to manually override
  • :line

    • int?
    • Optional.
    • The line number of the call site. This value be automatially supplied by the macro, so only use if you want to manually override.
  • :column

    • int?
    • Optional.
    • The column number of the call site. This value be automatially supplied by the macro, so only use if you want to manually override.
  • :highlighted-problem-section-label

    • string?
    • Optional.
    • Label for the highlighted problem diagram
  • :section-body-indentation

    • pos-int?
    • Optional.
    • Number of spaces to indent the body of each section
  • :preamble-section-label

    • string?
    • Optional.
    • The label of the preamble section
  • :preamble-section-body

    • string?
    • Optional.
    • The body of the preamble section
  • :success-message

    • string?
    • Optional.
    • The message to display if value passes schema validation

Prints a Malli validation error "callout" block via bling.core/callout.



Within the block, the value is pretty-printed, potentially with syntax
coloring. The problem value is highlighted with the `:highlight-error`
class of the active fireworks theme, or the `:highlight-error-underlined`
class, if the value is not a collection.



If three arguments are provided, the third should be a map
                     with the following optional keys:

* **`:function-name`**
    - `string?`
    - Optional.
    - The name of the function that can be used to construct
      the source location.

* **`:spacing`**
    - `#{"compact" :compact}`
    - Optional.
    - If the value of `:spacing` is set to `:compact`, the
      callout is compacted vertically.

* **`:display-schema?`**
    - `boolean?`
    - Optional.
    - Displays the schema passed to the underlying call to
      `malli.core/explain`.

* **`:display-explain-data?`**
    - `boolean?`
    - Optional.
    - Displays the output of `malli.core/explain` within the
      callout block.

* **`:callout-opts`**
    - `map?`
    - Optional.
    - A map of options for the underlying call to
      bling.core/callout.

* **`:hifi-opts`**
    - `map?`
    - Optional.
    - The options map for bling.hifi/hifi

* **`:file`**
    - `string?`
    - Optional.
    - The file name of the call site.
      This value be automatially supplied by the macro,
      so only use if you want to manually override

* **`:line`**
    - `int?`
    - Optional.
    - The line number of the call site.
      This value be automatially supplied by the macro,
      so only use if you want to manually override.

* **`:column`**
    - `int?`
    - Optional.
    - The column number of the call site.
      This value be automatially supplied by the macro,
      so only use if you want to manually override.

* **`:highlighted-problem-section-label`**
    - `string?`
    - Optional.
    - Label for the highlighted problem diagram

* **`:section-body-indentation`**
    - `pos-int?`
    - Optional.
    - Number of spaces to indent the body of each section

* **`:preamble-section-label`**
    - `string?`
    - Optional.
    - The label of the preamble section

* **`:preamble-section-body`**
    - `string?`
    - Optional.
    - The body of the preamble section

* **`:success-message`**
    - `string?`
    - Optional.
    - The message to display if value passes schema validation
sourceraw docstring

explain-malli*clj/s

(explain-malli* schema v)
(explain-malli*
  schema
  v
  {:keys [highlighted-problem-section-label select-keys-in-problem-path?
          section-body-indentation preamble-section-label preamble-section-body
          display-explain-data? section-label-style omit-section-labels
          display-schema? success-message file-info-str omit-sections
          callout-opts hifi-opts spacing column file line]
   :or {success-message :bling.explain/explain-malli-success
        section-label-style {:font-style :italic :color :subtle}}
   :as opts})
source

of-one?clj/s

(of-one? x)
source

regrouped-errorsclj/s

(regrouped-errors grouped-errors)

This is intended to reduce the number of errors that are reported.

Should only work when:

  • There are multiple errors in the erroneous values's error group
  • 2 or more errors are siblings based on their schema :path value
  • The grouped siblings with the longest path are used, and all other errors are discarded
This is intended to reduce the number of errors that are reported.

Should only work when:
- There are multiple errors in the erroneous values's error group
- 2 or more errors are siblings based on their schema :path value
- The grouped siblings with the longest path are used, and all other errors
  are discarded
sourceraw docstring

schema-path-siblingsclj/s

(schema-path-siblings filtered)
source

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