pub fn validate_section_keys<'a>(
provided: impl Iterator<Item = &'a str>,
schema: &TypeDefinition,
) -> Result<(), ValidationError>Expand description
Validate that every section key in provided is either schema-declared
for schema, or — if the schema has a catch-all section — admitted by
it. Unknown keys return ValidationError::UnknownSection carrying
the declared list plus a Levenshtein suggestion (or the catch-all key
when no close match exists).
Pure function: no I/O, no allocation outside the eventual error
payload. The "relationships" section is allowed through here — the
engine layer above gates it via its own SectionNotUpdatable check.