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
This support was added in #376 but only for non polymorphic fields.
However as per specification [0] `type` must not be a field name and
therefore must be forbidden in DJA as well.
Some dependents might depend on being allowed to have a field
name `type` so deprecating it now and remove it in next major version.
[0] https://jsonapi.org/format/#document-resource-object-fields
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ any parts of the framework not mentioned in the documentation should generally b
24
24
### Deprecated
25
25
26
26
* Deprecated `get_included_serializers(serializer)` function under `rest_framework_json_api.utils`. Use `serializer.included_serializers` instead.
27
+
* Deprecated support for field name `type` as it may not be used according to the [JSON:API spec](https://jsonapi.org/format/#document-resource-object-fields).
Copy file name to clipboardExpand all lines: setup.cfg
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,10 @@ filterwarnings =
60
60
error::PendingDeprecationWarning
61
61
# Django Debug Toolbar currently (2021年04月07日) specifies default_app_config which is deprecated in Django 3.2:
62
62
ignore:'debug_toolbar' defines default_app_config = 'debug_toolbar.apps.DebugToolbarConfig'. Django now detects this configuration automatically. You can remove default_app_config.:PendingDeprecationWarning
63
+
# TODO remove in next major version of DJA 5.0.0
64
+
# this deprecation warning filter needs to be added as AuthorSerializer is used in
65
+
# too many tests which introduced the type field name in tests
0 commit comments