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
Some schemas can set explicit default: replace to define what defaults are, but we will always just output #[serde(default)] on non-required properties.
Solution
Add an OutputImpls struct and collect things like impl Default for MemberStruct that will ensure #[serde(default)] works and takes into account the correct default values. This is especially important for enums where no default can be derived.
EDIT: This must also handle enums.
The text was updated successfully, but these errors were encountered:
Problem
Some schemas can set explicit
default: replace
to define what defaults are, but we will always just output#[serde(default)]
on non-required properties.Solution
Add an
OutputImpls
struct and collect things likeimpl Default for MemberStruct
that will ensure#[serde(default)]
works and takes into account the correct default values. This is especially important for enums where no default can be derived.EDIT: This must also handle enums.
The text was updated successfully, but these errors were encountered: