Auto parse fields from snake_case to camelCase on schema fields
See original GitHub issueHi! We have a problem about auto parsing snake_case to camelCase of schema fields. How we can disable this? We have fields of model for example “target_id” and don’t want to parse to “targetId”.
The same problem occurs when the reponse is JSON graphql type:
{"DATA1": "something"}
parsed to:
{"dATA1": "something"}
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:17 (9 by maintainers)
Top Results From Across the Web
How to inflect from snake case to camel case post the pydantic ...
I highly recommend u could try this.Using marshmallow . from marshmallow import Schema, fields def camelcase(s): parts = ...
Read more >Snake case to camel case conversion | Objection.js
When the conversion is done on objection level only database columns of the returned rows (model instances) are convered to camel case.
Read more >CamelCase Models with FastAPI and Pydantic - Medium
Aliases for pydantic models can be used in the JSON serialization in camel case instead of snake case as follows: from pydantic import...
Read more >Deserialize Snake Case to Camel Case With Jackson
In this short tutorial, we'll see how to deserialize snake case JSON to camel case fields using Jackson.
Read more >camelCase in front, snake_case in the back : r/javascript - Reddit
I don't understand why the Django API would generate snake case to be transformed. ... class PackageSchema(Schema): date_created = fields.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@phillip-hogan I think we should add an option as suggested. It should only remove illegal characters and maintain as much of the original name as possible.
We are about to make a major release that will include significant changes to how we sanitize names. I think we should begin to work on the option after the release.
In v2.0.0, we now have the
simpleNames
option which will only remove illegal characters! 🎉