You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a47683e
Browse filesBrowse the repository at this point in the historyBrowse files
Pydantic drops fields a model does not declare, so undeclared fields in
nested JSON request and response bodies were lost on validation and on
serialization back to the API.
Add python.preserveUnknownFields (default false). When enabled:
- generated models and error bodies allow extra fields, including
schemas with additionalProperties: false; explicitly typed additional
properties still validate
- model serializers read each declared field from the key Pydantic
emitted and copy the remaining keys back out
- marshal_json keeps nested nulls and only excludes a top-level None
- UNSET ignores extra fields
- generated test assertions compare only the fields their examples
declare, since mock responses can carry more
basemodel.py becomes a template, so the review SDK copy now passes
through the Python formatter.
The option is covered by an echo fragment exercised in the primary
(disabled), secondary and quaternary variants.
0 commit comments