metosin/malli

Check that one schema compatible with another schema

Open

#811 aperta il 5 gen 2023

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Clojure (237 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (1724 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor