Skip to content
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

style not included in utils.get_field_kwargs(); not aligned to DRF core arguments #288

Open
regoawt opened this issue Feb 17, 2022 · 2 comments · May be fixed by #289
Open

style not included in utils.get_field_kwargs(); not aligned to DRF core arguments #288

regoawt opened this issue Feb 17, 2022 · 2 comments · May be fixed by #289

Comments

@regoawt
Copy link

regoawt commented Feb 17, 2022

Currently, if style is defined as a kwarg on a mongoengine field, utils.get_field_kwargs() method does not build the DRF serializer field with it. To achieve this one has to wrap serializers.build_field() and update the field_kwargs dictionary, which seems unnecessary?

Is this intended behaviour?

The style argument is listed as a DRF 'core argument' on the base serializer field:
https://www.django-rest-framework.org/api-guide/fields/#core-arguments

@IATF
Copy link

IATF commented Feb 17, 2022 via email

@regoawt regoawt changed the title style not included in utils.get_field_kwargs(); not aligned to DRF core arguments style not included in utils.get_field_kwargs(); not aligned to DRF core arguments Feb 17, 2022
@regoawt regoawt linked a pull request Feb 17, 2022 that will close this issue
@BurkovBA
Copy link
Collaborator

@regoawt Hello.

I might be wrong, but I feel like style is a relatively new field in DRF.

Thank you for your PR .Please, add unit-tests to your changes, so that we could ensure their correctness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants