metosin/malli

Check that one schema compatible with another schema

开放

#811 创建于 2023年1月5日

 (3 条评论) (0 个反应) (0 位负责人)Clojure (237 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (1,724 个星标)
PR 合并指标
 (30 天内没有已合并 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.

贡献者指南