This fixes a couple of bugs. The first (#573) is pretty simple: when we merge schemas that contain both subschemas and other stuff, we drop all metadata; we should preserve the outer schema metadata for title and description in particular.
The next is that convert_schema_object calls merge_with_subschemas and expects it not to fail... but it can fail! In particular it will fail if the result of the merged schema is unsatisfiable (i.e. there is no value that would validate against the schema). In such a situation we now handle the error and produce a "never" schema (enum with no variants).
This fixes a couple of bugs. The first (#573) is pretty simple: when we merge schemas that contain both subschemas and other stuff, we drop all metadata; we should preserve the outer schema metadata for
title
anddescription
in particular.The next is that
convert_schema_object
callsmerge_with_subschemas
and expects it not to fail... but it can fail! In particular it will fail if the result of the merged schema is unsatisfiable (i.e. there is no value that would validate against the schema). In such a situation we now handle the error and produce a "never" schema (enum with no variants).Closes #573, #572