OpenAPITools / OpenAPITools/openapi-generator

[REQ] Would like a requestPropertyNaming config option in typeScript-fetch

Open
#7,017 0 comments 1 reaction 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

Is your feature request related to a problem? Please describe.

Currently requestProperty names are rewritten. For instance underscores are removed.

Describe the solution you'd like

I'd like an option to choose for original naming. just like with modelPropertyNaming and enumPropertyNaming.
eq. requestPropertyNaming - Naming convention for request properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'

Describe alternatives you've considered

At the moment i just rename them myself after generation. I don't have to generate them very often.

Additional context

This is a problem because I also generate a graphql schema which doesn't rename the properties, so there's a mismatch between them. I don't want to add translation from one to the other.

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 typeScript-fetch generator's handling of requestProperty names and compare it with the existing modelPropertyNaming and enumPropertyNaming options. Check how generated request properties are tested; done means requestPropertyNaming supports the listed conventions, including preserving original names, without changing the current default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
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.