oxidecomputer / typify

compiler from JSON Schema into idiomatic Rust types
Apache License 2.0
418 stars 57 forks source link

Allow multiple subschemas in top-level schemas #615

Closed ahl closed 2 months ago

ahl commented 3 months ago

Today we can't handle a top-level schema that looks like this:

{
    "allOf": [ .. ],
    "oneOf": [ .. ]
}

We can, however, handle similar constructions via the try_merge_with_subschemas function. It would be pretty simple to merge those subschemas and try to convert the resulting schema.