malli

Nikolas Pafitis 2024-11-09T16:13:53.626869Z

I'm a little confused on how to create a custom schema that has an underlying schema. I want to create a schema :reference that works like this: Say I have a schema for an entity:

{:person [:map {:entity/id :person/id}
           [:person/id :uuid]
           ...]
 ...
 :task [:map {:entity/id :task/id}
        ...
        [:task/person [:reference :person]]}
In this example i'd like [:reference :person] to resolve to :uuid. I find using reify on IntoSchema to be too complicated, and I'm not sure if I can just use -simple-schema instead.