swagger-api / swagger-api/swagger-codegen
Method generated with 2 parameters having the same name
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
First sorry if that issue has already reported.
Description
I have this specification :
And the method generated is:

As you can see 2 parameters have the same name.
I tried several options like: --additional-properties ensureUniqueParams=false without success.
We tested the same specification with open-api-generator and we do not have the same issue, they increment the parameter name.
Is there an option to customize that result?
Swagger-codegen version
3.0.24
Thank you
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
The issue names no source files or tests and provides the specification only as an image. Start by reproducing the generated method from the attached specification with Swagger Codegen 3.0.24, then trace parameter-name generation and the ensureUniqueParams option. Done means generated parameters have distinct names and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100