github vitalik/django-ninja v1.7.3

2 hours ago

What's Changed

  • Filter the response by the declared schema when a view returns a subclass instance in #1823
    • If a view declared response=UserOut and returned an instance of a subclass of UserOut, fields defined only on the subclass were included in the response (since 1.6.0). Now only the declared schema's fields are returned, as in 1.5.x.
    • Annotated[...] response types (e.g. with PlainSerializer) are now applied when a model instance is returned.

If your views return instances of subclasses of their response schema, we recommend upgrading.

Hotfix release cut from v1.7.2. It contains only the changes above.

Full Changelog: v1.7.2...v1.7.3

Don't miss a new django-ninja release

NewReleases is sending notifications on new releases.