schema

kasuko 2017-08-16T18:39:22.000197Z

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?

kasuko 2017-08-16T18:40:17.000080Z

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

kasuko 2017-08-16T18:41:29.000357Z

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

kasuko 2017-08-16T18:42:15.000132Z

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

kasuko 2017-08-16T18:42:41.000395Z

is that possible and/or desireable?