tortoise / tortoise/tortoise-orm

camelCase for JSON serialization

Open
#1,042 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

I've not started using the library and analysing before using this. I see I can set source_field to change DB column name. Is there way to define custom field name so that field names appear camelCase instead of snake_case in API response, just like how I save column name in db?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file, test, or entry point. Start by locating the JSON serialization path and how model fields are represented in API responses; done would require a decided way to expose custom camelCase names and coverage for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.