swagger-api / swagger-api/swagger-codegen

[jaxrs-spec] generated folder is invalid.

Open
#7,585 1 comment 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

Description

Swagger codegen write a following line in generated pom.xml file.

src/main/java

But Swagger codegen create following folder.

src/gen/java

Swagger-codegen version

2.2.2
2.2.3
3.1

Swagger declaration file content or url

Following code is invalid.

[source]
swagger-codegen / modules / swagger-codegen / src / main / java / io / swagger / codegen / languages / JavaJAXRSCXFCDIServerCodegen.java
[code]
sourceFolder = "src" + File.separator + "gen" + File.separator + "java";

Command line used for generation

swagger-codegen generate -i swagger.yml -l jaxrs-spec -o jaxrs-spec-server

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/JavaJAXRSCXFCDIServerCodegen.java and inspect how the jaxrs-spec generator's sourceFolder value reaches the generated pom.xml. Run the provided swagger-codegen command with the issue's example and compare the generated source directory with the pom configuration. Done means the generated pom.xml references the folder the generator creates.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.