Pure functions for Malli schema exploration: pretty-printing, diffing, and example generation. No I/O, no side effects — schema in, formatted strings or data out.
Pure functions for Malli schema exploration: pretty-printing, diffing, and example generation. No I/O, no side effects — schema in, formatted strings or data out.
(format-schema-diff diff)Format a diff map (as returned by schema-diff) as a readable string. Sections: 'Added:' (+), 'Removed:' (-), 'Changed:' (~). Returns 'Schemas are identical.' when diff is empty.
Format a diff map (as returned by schema-diff) as a readable string. Sections: 'Added:' (+), 'Removed:' (-), 'Changed:' (~). Returns 'Schemas are identical.' when diff is empty.
(format-schema-tree schema)Render a Malli schema as a readable indented tree. For :map schemas, shows each field name, its type, and '(optional)' when applicable. Handles nested :map schemas with increased indentation.
Render a Malli schema as a readable indented tree. For :map schemas, shows each field name, its type, and '(optional)' when applicable. Handles nested :map schemas with increased indentation.
(generate-example schema)(generate-example schema seed)Generate a single example value from a Malli schema. Pass an integer seed for deterministic output.
Generate a single example value from a Malli schema. Pass an integer seed for deterministic output.
(schema-diff schema-a schema-b)Compare two :map schemas. Returns {:added {key type} :removed {key type} :changed {key {:from type :to type}}}.
Compare two :map schemas.
Returns {:added {key type} :removed {key type} :changed {key {:from type :to type}}}.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 |