Fork me on GitHub
#malli
<
2020-01-02
>
ikitommi08:01:27

Quite happy how simple Schema transformations are with the current design, recursively closing all Schemas:

(defn closed-schema
  "Closes all :map Schemas recursively."
  [schema]
  (m/accept
    schema
    (m/schema-visitor
      (fn [schema]
        (if (= :map (m/name schema))
          (update-properties schema assoc :closed true)
          schema)))))