swagger-api / swagger-api/swagger-codegen
[C#] Getting extra models during client export
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Enter the following JSON into https://editor.swagger.io/ and generate a csharp client. In the models folder are Model.cs and Model1.cs. These look to be duplicates of MfdMemberViewModel but I'm not sure what is causing them to be created. Tests are also being created for these models.
Swagger-codegen version: 2.0
JSON gist: https://gist.github.com/evenflow58/801c6570ef36c1bdeafb958e48f9d5de
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
Reproduce the export in https://editor.swagger.io/ using the JSON gist and generate the C# client. Inspect the generated models folder and tests, especially Model.cs, Model1.cs, and MfdMemberViewModel, to identify why duplicates are created; done means the unintended models and their tests are no longer generated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100