If a schema sets additionalProperties to false, it's asking us to reject structs with unknown fields. If it also doesn't define any patternProperties, the explicitly enumerated set of properties is exhaustive, so we can safely set #[serde(deny_unknown_fields)].
If a schema sets
additionalProperties
to false, it's asking us to reject structs with unknown fields. If it also doesn't define anypatternProperties
, the explicitly enumerated set of properties is exhaustive, so we can safely set#[serde(deny_unknown_fields)]
.