metosin/malli

Check that one schema compatible with another schema

Open

#811 opened on Jan 5, 2023

 (3 comments) (0 reactions) (0 assignees)Clojure (237 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (1,724 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

For example, there are 2 schemas:

(def person [:map
             [:first-name :string]
             [:last-name {:optional true} :string]
             [:age :int]])

(def person-full-name [:map
                       [:first-name :string]
                       [:last-name {:optional true} :string]])

So, I'm trying to check that person-full-name is fully compatible with person schema and any value which conform person schema will be conform person-full-name schema too.

Contributor guide