metosin/malli

Check that one schema compatible with another schema

Open

#811 建立於 2023年1月5日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Clojure (1,724 star) (237 fork)batch import
enhancementhelp wanted

描述

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.

貢獻者指南