swagger-api / swagger-api/swagger-codegen

[Java] Duplicate methods for generated by versions 3.0.11 and 3.0.16

Open
#10,034 1 comment 2 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

The attached Json file is generated using the WP API SwaggerUI plugin on an empty Wordpress installation. Any use of the cli for java code, e.g.
java -jar swagger-codegen-cli-3.0.11.jar generate -i ../../wordpressv2/schema.json -l java -o ../../wordpressv2 --model-package ch.performancebuildings.wp.v2.model --api-package ch.performancebuildings.wp.v2.api --invoker-package ch.performancebuildings.wp.v2.invoker --group-id ch.performancebuildings.wp.v2 --artifact-version 3.22.0
creates an EndpointApi.java class with duplicate methods. Same with e.g. version 2.4.8 produces a correkt syntax.

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 the attached schema.json and reproduce generation using swagger-codegen-cli 3.0.11 and 3.0.16, comparing the generated EndpointApi.java with version 2.4.8. Trace the generator or templates responsible for the duplicate methods; done means the generated Java API has no duplicate methods and remains syntactically valid.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.