swagger-api / swagger-api/swagger-codegen

[Scala][Client] ApiInvoker setting invokerPackage from command line does not work

Open
#7,894 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Command
java -jar util/swagger-codegen-cli.jar generate -DsupportingFiles -DinvokerPackage=pack -i <???> -l scala -t <???> or
java -jar util/swagger-codegen-cli.jar generate --invoker-package pack -DsupportingFiles -i <???> -l scala -t <???>
generates src/main/scala/io/swagger/client/ApiInvoker file.
I expect that it will generate src/main/scala/pack/ApiInvoker file.

I suppose it is because the value of invokerPackage always is overriden by the constructor in ScalaClientCodegen.java https://github.com/swagger-api/swagger-codegen/blob/ea2474d7075b52d41547248df86275b574e23f0e/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java#L44

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 with modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java at the constructor referenced in the issue, then reproduce the behavior with the shown swagger-codegen-cli.jar command. Done means both invokerPackage command-line forms generate ApiInvoker under src/main/scala/pack rather than io/swagger/client.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.