swagger-api / swagger-api/swagger-codegen

Method generated with 2 parameters having the same name

Open
#10,911 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

First sorry if that issue has already reported.

Description

I have this specification :
callListSwagger

And the method generated is:
callList_LI

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.