OpenAPITools / OpenAPITools/openapi-generator

For java, optionally transform dotted object names to packages

Open
#13,902 1 comment 6 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

An object with a name like org.foo.bar.SomeClass generates a pojo OrgFooBarSomeClass. While this works it makes huge names on some specs I must consume.

An option to not camelize as it does now, but use this as a package name (maybe nested within the global model package or not?), and put in the appropriate directories.

I am coming from schema first/code generating xmlschema world, and that's what jaxb does.

(I did look in every place I could think of including source, if this option exists I could not find 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

The issue names no files, tests, or generator entry point. Start by locating the Java generator's model-name and package-handling code, then compare the desired dotted-name behavior with the existing camelization. Done means a documented option that places generated models in the intended packages without producing oversized class names, with coverage for the option's behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.