metosin/malli

Check that one schema compatible with another schema

オープン

#811 opened on 2023/01/05

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Clojure (237 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (1,724 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

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