You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(s/defschemaA
(sam/abstract-map-schema:type {}))
(sam/extend-schema AA A ["type"] {})
(s/defschemaB
(sam/abstract-map-schema:bar {}))
(sam/extend-schema BB B ["bar"] A)
(s/checker {:x B})
yields
Unhandled clojure.lang.Compiler$CompilerException
Caused by java.lang.IllegalArgumentException
No implementation of method: :spec of protocol:
#'schema.core/Schema found for class: clojure.lang.Boolean
Replacing A by AA in the BB extension yields a similar exception, this time with clojure.lang.Symbol.
The text was updated successfully, but these errors were encountered:
I would like to reuse an abstract map schema as extension of another abstract map schema.
Consider the use case where I categorize animals by name (cat), and cat features by color (black, white).
Thanks for the explanation. That's unfortunately not possible currently -- the last argument to extend-schema has to be an ordinary map schema. I think it should be straightforward to build a variant of abstract-map-schema that does what you want, however.
It seems like I can't nest abstract map schemas.
Eval'ing
yields
Replacing
A
byAA
in theBB
extension yields a similar exception, this time withclojure.lang.Symbol
.The text was updated successfully, but these errors were encountered: