Closed miwig closed 4 months ago
will go into the
convert_all_of
branch and (in my opinion incorrectly) generate:pub struct MySubschema { #[serde(default, skip_serializing_if = "Option::is_none")] pub bar: Option<i64>, }
Why do you feel this would be incorrect? What type would you expect or what type would more faithfully model the schema?
will go into the
convert_all_of
branch and (in my opinion incorrectly) generate:pub struct MySubschema { #[serde(default, skip_serializing_if = "Option::is_none")] pub bar: Option<i64>, }
Why do you feel this would be incorrect? What type would you expect or what type would more faithfully model the schema?
The outer metadata should be preserved, so the struct name should be MyRootSchema
. I think #575 did not fix this case. However I can confirm that the panic in the other case has been fixed. :tada: Thanks for the swift response :+1:
Processing this schema:
will panic with
due to metadata getting lost somewhere in the
// Subschemas with other stuff.
branch ofTypeSpace::convert_schema_object
.Reducing the schema to:
will go into the
convert_all_of
branch and (in my opinion incorrectly) generate:anyOf
also shows the same behaviour.For an example of such a schema in the wild, see (after resolving references):