I'v already written Schemas for the Value-Filters but struggle to assemble them in a tree-like structure in combination with "or", "and" & "not"-Filters.
lazy is not currently supported by variant. I will investigate if it is possible and useful to change this. In the meantime, you can switch to union. See this playground.
I'm currently trying to implement a Schema for the following data structure.
I'v already written Schemas for the Value-Filters but struggle to assemble them in a tree-like structure in combination with "or", "and" & "not"-Filters.
Example
Im generally not sure, if I structured things right - how would a schema for such a recursivly nested data structure look like?
It seems be currently not possible to use
lazy
withinvariant
:Also
GenericSchema
does not seem to satisfy the requirements forvariant()
either.Maybe someone has some suggestions how I could improve things.
Thank you very much in advance :star2: