swagger-api / swagger-api/swagger-codegen
Java Client Generator ignores 'sourceFolder' option
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I just started using 2.1.6-SNAPSHOT in one project and it seems that the java client generator ignores the sourceFolder option in config.json.
It simply generates the files into the current dir.
Config to reproduce:
{
"library": "jersey2",
"sourceFolder" : "src/generated/java",
"apiPackage":"ch.sample.snap.api",
"modelPackage":"ch.sample.snap.model",
"invokerPackage":"ch.sample.snap.api.invoker"
}
I then go on to compile the source in src/generated/java using a customized gradle build (not the one generated).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Java client generator and the config.json option shown in the report, then reproduce generation with sourceFolder set to src/generated/java. Trace where the output directory is selected and verify that generated files are placed under the configured sourceFolder rather than the current directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100