I wanted to pop in here for thoughts & opinion...
# kotest
s
I wanted to pop in here for thoughts & opinions regarding this issue that I opened, for the ability to match multiple types in a json schema in the issue I proposed two solutions my preferred one is to change
JsonSchema.JsonObjectBuilder.properties
from
MutableMap<String, JsonSchemaElement>
to
MutableMap<String, Matcher<JsonSchemaElement>>
, to accommodate this. this would also easily allow for more complex matching logic. the other solution I proposed would be to introduce an additional
JsonSchemaElement
named
JsonCompositeElement
, which allowed composing multiple sub-element types. although I don't particularly think this is the ideal solution, as it is no longer a json element itself, but rather a composition of existing elements.