OpenAPITools / OpenAPITools/openapi-generator

[REQ] [Python] Add modelPropertyNaming=original/camelCase to the "python" generator

Open
#20,554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Currently Python model properties are always generated as snake_case. I want to preserve the original camelCase properties naming of my openapi spec, but the modalPropertyNaming configuration prop is not supported on the python generator, it would be nice to add it.

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

Start by locating the Python generator entry point and its model-property naming configuration, then compare how modelPropertyNaming is handled elsewhere in the generator. Done means the Python generator accepts original and camelCase values while retaining the current snake_case behavior when selected, with coverage for the generated model properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.