OpenAPITools / OpenAPITools/openapi-generator

[Kotlin] Get rid of "infrastructure" folder inside generated artifact package name

Open
#6,818 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

I have a config file which specifies the apiPackage, modelPackage and invokerPackage. With apiPackage and modelPackage it works but for the invokerPackage it always takes the default org/openapitools/client/ directory (and the folder is named infrastructure instead of invoker?).
With Java it works, so it must have something to do with openapi itself.

openapi-generator version

5.0.0-SNAPSHOT

Command line used for generation

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i /path/to/swagger.json -g kotlin -o /path/to/output -c /path/to/config.json --additional-properties useRxJava2=true

config.json

{
"apiPackage":"ch.something.something.httpclient.api",
"modelPackage":"ch.something.something.httpclient.model",
"invokerPackage":"ch.something.something.httpclient.invoker",
"library": "jvm-retrofit2"
}

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

Reproduce the issue with the supplied CLI command, config.json, and jvm-retrofit2 library, then compare the Kotlin output with the reported Java behavior. Trace how the Kotlin generator handles apiPackage, modelPackage, and invokerPackage; done means the configured invokerPackage is used without the default infrastructure folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.