-
Notifications
You must be signed in to change notification settings - Fork 301
Deprecated usage of type
field name
#993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This support was added in django-json-api#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
47128f3
to
a79a0a0
Compare
Codecov Report
@@ Coverage Diff @@
## master #993 +/- ##
=======================================
Coverage 96.84% 96.84%
=======================================
Files 65 65
Lines 3929 3933 +4
=======================================
+ Hits 3805 3809 +4
Misses 124 124
Continue to review full report at Codecov.
|
won;t this break that PR? can any alternative name could be used? |
The issue is that |
ok. fair enough. can field_type be used instead? don't get annoyed by my questions btw |
@auvipy If you are talking about if an application using DJA already has a serializer with a field name type. Yes in such a case you can simply rename the field name to |
thats great! |
Deprecating of #376
Description of the Change
Partial support for field name
type
was added in #376 but only for non polymorphic fields.However as per specification
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.Checklist
CHANGELOG.md
updated (only for user relevant changes)AUTHORS