pub fn apply_meta(
target: &mut Value,
meta: &MetaMap,
context: &str,
) -> Result<()>Expand description
Copies meta onto target, which must be a JSON object.
- Keys starting with
x-are copied verbatim (both formats allow arbitrary specification extensions). - Keys in [
RECOGNISED_META_KEYS] are copied verbatim. - Anything else is a hard error naming
context, so a mistake surfaces at generation time rather than as a quietly missing field.
Existing keys on target are overwritten: meta is an explicit author
annotation and should win over an inferred default.