Fix schema generation for flatten Options
This commit is contained in:
parent
5bf8b30753
commit
18c2d417e3
5 changed files with 34 additions and 13 deletions
|
@ -318,7 +318,7 @@ fn schema_for_struct(fields: &[Field], cattrs: &attr::Container) -> TokenStream
|
|||
let flattens = flat.iter().map(|field| {
|
||||
let ty = get_json_schema_type(field);
|
||||
quote_spanned! {field.original.span()=>
|
||||
.flatten(<#ty>::json_schema_non_null(gen))
|
||||
.flatten(<#ty>::json_schema_optional(gen))
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue