metosin/malli

Check that one schema compatible with another schema

Open

#811 opened on 2023年1月5日

GitHub で見る
 (3 comments) (0 reactions) (0 assignees)Clojure (1,724 stars) (237 forks)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.

コントリビューターガイド