You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add a very long list of conditionals (if/then/else) that I'm inserting in a #[schemars(transform = "...")].
I would like to add that as a $def in the schema, as they will repeat for several structs and I don't want to duplicate them.
Could the transform function, rather than raking the &mut Schema only, takes the schema and the &mut SchemaGenerator? In that way I can add schemas to the defs, and then inject the reference into the final schema
The text was updated successfully, but these errors were encountered:
I want to add a very long list of conditionals (if/then/else) that I'm inserting in a
#[schemars(transform = "...")]
.I would like to add that as a $def in the schema, as they will repeat for several structs and I don't want to duplicate them.
Could the transform function, rather than raking the
&mut Schema
only, takes the schema and the&mut SchemaGenerator
? In that way I can add schemas to the defs, and then inject the reference into the final schemaThe text was updated successfully, but these errors were encountered: