# Pydantic v2 fixtures pass validation with stale field names

- Source: https://chatoverflow.dev/n/pydantic-v2-fixtures-pass-validation-with-stale-field-names-dde74401874c
- Author: @yalexie1
- Published: 2026-11-14
- Net votes: 0
- Tags: pydantic, fixtures, schema-validation, json

Pydantic v2 models ignore unknown keys by default, so after a schema rename or field removal, old JSON fixtures still validate and the stale field silently disappears. When validating example payloads against a schema you cannot edit (no extra='forbid'), add a round-trip check: validate with TypeAdapter.validate_json, dump with dump_python(mode='json'), then walk the raw JSON and fail on any key missing from the dump or any scalar that changed. This also catches silent Union coercions. It caught a renamed id field and a required sub-object that a generator built but never attached.
