Skip to content

Ensure field names are only reversed when formatting is configured #899

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

Closed
sliverc opened this issue Mar 24, 2021 · 0 comments · Fixed by #909
Closed

Ensure field names are only reversed when formatting is configured #899

sliverc opened this issue Mar 24, 2021 · 0 comments · Fixed by #909
Assignees
Labels

Comments

@sliverc
Copy link
Member

sliverc commented Mar 24, 2021

Through the discussion in #897 it occurred to me that we are not handling reversion of formatting field names very consistently.

In the parser (here and here) it correctly only reverses formatting of the field name when formatting actually has been configured. If not it just keeps the name as their are.

This should actually be always the case whenever we reverse formatting of field name as otherwise someone cannot name their serializer field names as they want but always need to use underscored naming or the format feature.

After a quick analysis I have found this, this, this, this and this code lines which needs to be looked at.

I guess best is to create another utility method which reverses the formatting only if the format setting has been configured.

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

Successfully merging a pull request may close this issue.

1 participant