Djangorestframework-jsonapi

Latest version: v7.0.0

Safety actively analyzes 629678 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

4.2.0

Added

* Added support for Django 3.2.
* Added support for tags in OAS schema

Fixed

* Allow `get_serializer_class` to be overwritten when using related urls without defining `serializer_class` fallback
* Preserve field names when no formatting is configured.
* Properly support `JSON_API_FORMAT_RELATED_LINKS` setting in related urls. In case you want to use `dasherize` for formatting links make sure that your url pattern matches dashes as well like following example:

url(r'^orders/(?P<pk>[^/.]+)/(?P<related_field>[-\w]+)/$',
OrderViewSet.as_view({'get': 'retrieve_related'}),
name='order-related'),

* Ensure default `included_resources` are considered when calculating prefetches.
* Avoided error when using `include` query parameter on related urls (a regression since 4.1.0)

Deprecated

* Deprecated default `format_type` argument of `rest_framework_json_api.utils.format_value`. Use `rest_framework_json_api.utils.format_field_name` or specify specifc `format_type` instead.
* Deprecated `format_type` argument of `rest_framework_json_api.utils.format_link_segment`. Use `rest_framework_json_api.utils.format_value` instead.

4.1.0

Added

* Ability for the user to select `included_serializers` to apply when using `BrowsableAPI`, based on available `included_serializers` defined for the current endpoint.
* Ability for the user to format serializer properties in URL segments using the `JSON_API_FORMAT_RELATED_LINKS` setting.

Fixed

* Allow users to overwrite a view's `get_serializer_class()` method when using [related urls](https://django-rest-framework-json-api.readthedocs.io/en/stable/usage.html#related-urls)
* Correctly resolve the resource type of `ResourceRelatedField(many=True)` fields on plain serializers
* Render `meta_fields` in included resources

4.0.0

This release is not backwards compatible. For easy migration best upgrade first to version

3.2.0

This is the last release supporting Django 1.11, Django 2.1, Django REST framework 3.10, Django REST framework 3.11 and Python 3.5.

Added

* Added support for serializing nested serializers as attribute json value introducing setting `JSON_API_SERIALIZE_NESTED_SERIALIZERS_AS_ATTRIBUTE`
* Note: As keys of nested serializers are not JSON:API spec field names they are not inflected by format field names option.
* Added `rest_framework_json_api.serializer.Serializer` class to support initial JSON:API views without models.
* Note that serializers derived from this class need to define `resource_name` in their `Meta` class.
* This fix might be a **BREAKING CHANGE** if you use `rest_framework_json_api.serializers.Serializer` for non JSON:API spec views (usually `APIView`). You need to change those serializers classes to use `rest_framework.serializers.Serializer` instead.

Fixed

* Avoid `AttributeError` for PUT and PATCH methods when using `APIView`
* Clear many-to-many relationships instead of deleting related objects during PATCH on `RelationshipView`
* Allow POST, PATCH, DELETE for actions in `ReadOnlyModelViewSet`. Regression since version `2.8.0`.
* Properly format nested errors

Changed

* `SerializerMethodResourceRelatedField` is now consistent with DRF `SerializerMethodField`:
* Pass `method_name` argument to specify method name. If no value is provided, it defaults to `get_{field_name}`
* Allowed repeated filter query parameters.

Deprecated

* Deprecate `source` argument of `SerializerMethodResourceRelatedField`, use `method_name` instead
* Rendering nested serializers as relationships is deprecated. Use `ResourceRelatedField` instead

3.1.0

Added

* Added support for Python 3.8
* Added support for Django REST framework 3.11
* Added support for Django 3.0

Fixed

* Ensured that `409 Conflict` is returned when processing a `PATCH` request in which the resource object’s type and id do not match the server’s endpoint as outlined in [JSON:API](https://jsonapi.org/format/#crud-updating-responses-409) spec.
* Properly return parser error when primary data is of invalid type
* Pass instance to child serializers when using `PolymorphicModelSerializer`
* Properly resolve related resource type when using `PolymorphicModelSerializer`

3.0.0

This release is not backwards compatible. For easy migration best upgrade first to version

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.