Skip to content

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

Closed
@sliverc

Description

@sliverc

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions