question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto parse fields from snake_case to camelCase on schema fields

See original GitHub issue

Hi! 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
Alan-Chacommented, Jan 9, 2020

@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.

1reaction
Alan-Chacommented, Jan 28, 2020

In v2.0.0, we now have the simpleNames option which will only remove illegal characters! 🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found