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.

贡献者指南

Check that one schema compatible with another schema · metosin/malli#811 | Good First Issue