Skip to content

v0.4.3

Latest

Choose a tag to compare

@mikasenghaas mikasenghaas released this 18 Aug 00:24
65b15df

Patch release that fixes validation_alias handling inside union and optional fields.

Fixes

  • Alias normalization now reaches union and optional fields (#23) — AliasChoices spellings on a field inside a discriminated-union variant (or an Optional[Model]) were never rewritten to their canonical key. A config file using the alias plus a CLI flag using the canonical name then survived the merge as two distinct keys: extra="forbid" rejected the pair, or the file value silently beat the CLI override. Aliases in these positions now collapse onto one canonical key with normal CLI > file > default precedence, with union variants selected by their discriminator tag when the data carries one.