Fork me on GitHub
#malli
<
2023-12-14
>
macrobartfast07:12:51

Is this a valid schema?

(def schema
  {:cat/id :uuid
   :cat [:map {:closed true}
         [:xt/id       :cat/id]
         [:cat/name    :string]
         [:cat/age     :int]]})

Stig Brautaset10:12:18

You don't have to use a registry, though. You could also specify it like this:

(def CatId uuid?)

(def Cat 
  [:map {:closed true}
    [:xt/id CatId]
    [:cat/name :string]
    [:cat/age :int]])

macrobartfast07:12:45

Thanks! That latter option will work great.