We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using the https://github.com/vbabiy/djangorestframework-camel-case in order to format the response to camel case. The problem is when there is any Error is raised, the fields are rendered as snake case. Here are the example:
When resource is successfully created I get this response:
{ "createdAt": "2024-07-28T13:58:50.062565Z", "updatedAt": "2024-07-28T13:58:50.062691Z", "clientName": "string", "clientPhone": "string", "clientEmail": "[email protected]", "taskTime": "2024-07-28T13:58:13.054000Z", "notes": "string", "paymentAmount": 20, "paymentMethod": "ONLINE",{ "type": "validation_error", "errors": [ { "code": "required", "detail": "This field is required.", "attr": "client_name" } ] } "isCompleted": true, "jobType": "APPLY", "jobDeadline": "2024-07-28T13:58:13.054000Z", "applyDeadline": "2024-07-28T13:58:13.054000Z", "brokerage": "MY-BROKERAGE", "showClientPhoneNumber": true, "accessInformation": "string", "createdBy": null, "property": 1, "assignedTo": null }
But when an error is raised, I am getting attr rendered in snake case due to which api developers are getting too much confused :
{ "type": "validation_error", "errors": [ { "code": "required", "detail": "This field is required.", "attr": "client_name" } ] }
The text was updated successfully, but these errors were encountered:
Hi @amitv9493, djangorestframework-camel-case is not supported out of the box, still check #59, it might be helpful to solve your issue
Sorry, something went wrong.
No branches or pull requests
I am using the https://github.com/vbabiy/djangorestframework-camel-case in order to format the response to camel case. The problem is when there is any Error is raised, the fields are rendered as snake case. Here are the example:
When resource is successfully created I get this response:
But when an error is raised, I am getting attr rendered in snake case due to which api developers are getting too much confused :
The text was updated successfully, but these errors were encountered: