vbabiy / djangorestframework-camel-case

Camel case JSON support for Django REST framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`ValidationError` field names are not camelized

l0b0 opened this issue · comments

When I raise rest_framework.serializers.ValidationError({'some_field_name': 'some message'}) the resulting API response is {'some_field_name': [ErrorDetail(string='some message', code='invalid')]}. The expected response would be {'someFieldName': [ErrorDetail(string='some message', code='invalid')]}.

Those errors look like they are on the python side, not the JSON response. The render doesn't touch them at that point.