swagger-api / swagger-api/swagger-codegen

[csharp] ApiResponseDelete.cs is not being generated but referred to by generated code

Open
#5,676 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: C-Sharp Issue: Bug Swagger-Parser
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

The csharp client is missing one class file (in this case ApiResponseDelete.cs). Other classes use instances of the missing ApiResponseDelete class.

Swagger-codegen version

2.2.2

Swagger declaration file content or url

https://docs.newsletter2go.com/doc/swagger.json

Command line used for generation
> java -jar swagger-codegen-cli-2.2.2.jar -l csharp -i https://docs.newsletter2go.com/doc/swagger.json
Steps to reproduce
> java -jar swagger-codegen-cli-2.2.2.jar -l csharp -i https://docs.newsletter2go.com/doc/swagger.json
> build.bat
 ...
src\IO.Swagger\Api\RecipientApi.cs(1497,62): error CS0246: The type or namespace
        name 'ApiResponseDelete' could not be found (are you missing a using
        directive or an assembly reference?)
 ...

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

Reproduce the generation with swagger-codegen-cli-2.2.2 using the linked swagger.json, then inspect the generated Api\RecipientApi.cs reference and the C# generator inputs that determine which model files are emitted. Run build.bat and confirm that generation includes ApiResponseDelete.cs and the resulting client builds without the missing-type error.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.