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 3 of 4

2.8.0

This is the last release supporting Python 2.7, Python 3.4, Django Filter 1.1, Django REST framework <=3.9 and Django 2.0.

Added

* Add support for Django 2.2

Changed

* Allow to define `select_related` per include using [select_for_includes](https://django-rest-framework-json-api.readthedocs.io/en/stable/usage.html#performance-improvements)
* Use REST framework serializer functionality to extract includes. This adds support like using
dotted notations in source attribute in `ResourceRelatedField`.

Fixed

* Avoid exception when trying to include skipped relationship
* Don't swallow `filter[]` params when there are several
* Fix DeprecationWarning regarding collections.abc import in Python 3.7
* Allow OPTIONS request to be used on RelationshipView
* Remove non-JSON:API methods (PUT and TRACE) from ModelViewSet and RelationshipView.
This fix might be a **BREAKING CHANGE** if your clients are incorrectly using PUT instead of PATCH.
* Avoid validation error for missing fields on a PATCH request using polymorphic serializers

Deprecated

* Deprecate `PrefetchForIncludesHelperMixin` use `PreloadIncludesMixin` instead

2.7.0

Added

* Add support for Django 2.1, DRF 3.9 and Python 3.7. Please note:
- Django >= 2.1 is not supported with Python < 3.5.

Fixed

* Pass context from `PolymorphicModelSerializer` to child serializers to support fields which require a `request` context such as `url`.
* Avoid patch on `RelationshipView` deleting relationship instance when constraint would allow null ([242](https://github.com/django-json-api/django-rest-framework-json-api/issues/242))
* Avoid error with related urls when retrieving relationship which is referenced as `ForeignKey` on parent
* Do not render `write_only` relations
* Do not skip empty one-to-one relationships
* Allow `HyperlinkRelatedField` to be used with [related urls](https://django-rest-framework-json-api.readthedocs.io/en/stable/usage.html?highlight=related%20links#related-urls)
* Avoid exception in `AutoPrefetchMixin` when including a reverse one to one relation ([537](https://github.com/django-json-api/django-rest-framework-json-api/issues/537))
* Avoid requested resource(s) to be added to included as well ([524](https://github.com/django-json-api/django-rest-framework-json-api/issues/524))

2.6.0

Added

* Add testing configuration to `REST_FRAMEWORK` configuration as described in [DRF](https://www.django-rest-framework.org/api-guide/testing/#configuration)
* Add `HyperlinkedRelatedField` and `SerializerMethodHyperlinkedRelatedField`. See [usage docs](docs/usage.mdrelated-fields)
* Add related urls support. See [usage docs](docs/usage.mdrelated-urls)
* Add optional [jsonapi-style](https://jsonapi.org/format/) filter backends. See [usage docs](docs/usage.md#filter-backends)

Deprecated

* Deprecate `MultipleIDMixin` because it doesn't comply with the JSON:API 1.0 spec. Replace it with
`DjangoFilterBackend` and **change clients** to use `filter[id.in]` query parameter instead of `ids[]`.
See [usage docs](docs/usage.mddjangofilterbackend). You also have the option to copy the mixin into your code.

Changed

* Replaced binary `drf_example` sqlite3 db with a [fixture](example/fixtures/drf_example.json). See [getting started](docs/getting-started.mdrunning-the-example-app).
* Replaced unmaintained [API doc](docs/api.md) with [auto-generated API reference](docs/api.rst).

Fixed

* Performance improvement when rendering relationships with `ModelSerializer`
* Do not show deprecation warning when user has implemented custom pagination class overwriting default values.

2.5.0

Added

* Add new pagination classes based on JSON:API query parameter *recommendations*:
* `JsonApiPageNumberPagination` and `JsonApiLimitOffsetPagination`. See [usage docs](docs/usage.mdpagination).
* Add `ReadOnlyModelViewSet` extension with prefetch mixins
* Add support for Django REST framework 3.8.x
* Introduce `JSON_API_FORMAT_FIELD_NAMES` option replacing `JSON_API_FORMAT_KEYS` but in comparison preserving
values from being formatted as attributes can contain any [json value](https://jsonapi.org/format/#document-resource-object-attributes).
* Allow overwriting of `get_queryset()` in custom `ResourceRelatedField`

Deprecated

* Deprecate `PageNumberPagination` and `LimitOffsetPagination`. Use `JsonApiPageNumberPagination` and `JsonApiLimitOffsetPagination` instead.
* To retain deprecated values for `PageNumberPagination` and `LimitOffsetPagination` create new custom class like the following in your code base:
python
class CustomPageNumberPagination(PageNumberPagination):
page_query_param = "page"
page_size_query_param = "page_size"

class CustomLimitOffsetPagination(LimitOffsetPagination):
max_limit = None

and adjust `REST_FRAMEWORK['DEFAULT_PAGINATION_CLASS']` setting accordingly.
* Deprecate `JSON_API_FORMAT_KEYS`, use `JSON_API_FORMAT_FIELD_NAMES`.

Fixed

* Performance improvement when rendering included data

2.4.0

Added

* Add support for Django REST framework 3.7.x.
* Add support for Django 2.0.

Removed

* Drop support for Django 1.8 - 1.10 (EOL)
* Drop support for Django REST framework < 3.6.3
(3.6.3 is the first to support Django 1.11)
* Drop support for Python 3.3 (EOL)

2.3.0

Added

* Add support for polymorphic models
* Add nested included serializer support for remapped relations

Changed

* Enforcing flake8 linting

Fixed
* When `JSON_API_FORMAT_KEYS` is False (the default) do not translate request
attributes and relations to snake\_case format. This conversion was unexpected
and there was no way to turn it off.
* Fix for apps that don't use `django.contrib.contenttypes`.
* Fix `resource_name` support for POST requests and nested serializers

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.