djangorestframework-dataclasses v0.9
Breaking changes:
- The serializer field for dataclass fields that have a default value or default value factory, are now marked as optional (
required=False
). - Marking dataclass fields with
typing.Optional
no longer causes the serializer fields to be optional (they will still be marked as nullable). In previous versions these fields would be optional, which broke if a field had no default value. Due to the preceding change, the common case of fields marked withtyping.Optional
andNone
as a default value, have no change in behaviour. - Drop support for generic
typing.Final
type hints (without the type specified), astyping.Final
was never supposed to be used in this way, and Python 3.10 will drop support for it.
Features & fixes:
- Support overriding serializer for a nested dataclass using
serializer_field_mapping
. - Support overriding serializer for all nested dataclasses using
serializer_dataclass_field
property. - Support partial updates of nested dataclasses.
- Support bound type variables.
- Support field generation for enumerations.
- Support specifying serializer field configuration in dataclass field metadata.
- Fix value for non-specified optional fields in validated_data on serializers with
many=True
.