Fork me on GitHub
#schema
<
2017-08-16
>
kasuko18:08:22

Hey, I have a question I can’t seem to google. I was wondering if it was possible to implement some form of inheritance with schema?

kasuko18:08:17

For example if I have a map that represents a generic Widget I could have the schema {:id s/Str :type s/Keyword}

kasuko18:08:29

but if I want to have a schema for WidgetA that requires the additional keys :foo and :bar but I could also have a WidgetB that has additional keys :waz and :boo

kasuko18:08:15

However when defining the WidgetA and WidgetB schemas I’d love to be able to say it must be a valid Widget as well

kasuko18:08:41

is that possible and/or desireable?