swagger-api / swagger-api/swagger-codegen

C# Client CodeGen is generating classes with duplicate properties

Open
#11,813 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

C# Client code is generating duplicated properties for a swagger.

Swagger-codegen version

swagger-codegen-CLI-3.0.27.jar

Swagger declaration file content or url

C# Client CodeGen is generating classes with duplicate properties for the attached API. "requestedPassengerType" property is duplicated inside PriceBreakdownAir class. string carrier = default(string), string number = default(string), string operating carrier are duplicated inside "Flight" class

Suggest a fix/enhancement

C#CodegenIssue.docx

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 by reproducing the duplicate-property output with swagger-codegen-CLI-3.0.27.jar and the API details in C.CodegenIssue.docx. Inspect how C# client generation produces PriceBreakdownAir and Flight; done means those classes no longer contain the reported duplicate properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
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.