getSchemaFlatCombinations
fun getSchemaFlatCombinations(schema: Schema<*>, depth: Int = 0, visitedRefs: MutableSet<String> = mutableSetOf(), budget: CombinationBudget? = null, resolve: (Schema<*>) -> Schema<*> = { it }): List<Schema<*>>
Expands a schema with oneOf/anyOf into all possible flat combinations.
For schemas with oneOf: [A, B] and anyOf: [C, D], this produces the Cartesian product of valid combinations, each merged into a standalone schema.
Return
list of flat schemas representing all valid combinations
Parameters
schema
the schema to expand
depth
current recursion depth
visitedRefs
mutable set tracking visited $ref pointers
budget
optional budget to limit combinatorial explosion
resolve
function to dereference $ref schemas