swagger-api / swagger-api/swagger-codegen

[C#] Generating client with empty variable names

Open
#9,241 3 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

Description

Using version 3, I tried to generate C# code for Magento 2.3's API. The generated code did not compile.

I used Windows 10 x64, Oracle JDK 1.8_201

Command line used for generation

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i https://devdocs.magento.com/swagger/schemas/latest-2.3.schema.json -l csharp -o C:\workspace\swagger-codegen\generated-v3-190606

Steps to reproduce
  1. Clone the repo
  2. mvn clean package -Dmaven.test.skip=true
  3. java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i https://devdocs.magento.com/swagger/schemas/latest-2.3.schema.json -l csharp -o C:\workspace\swagger-codegen\generated-v3-190606
  4. Because I also encountered this issue, I first fixed it.
  5. Restore nuget packages, build --> Errors

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 with the Maven build and the swagger-codegen-cli generate command in the issue, using the Magento 2.3 schema and the C# generator. Inspect the generated client’s compile errors after restoring NuGet packages; done means the generated C# client no longer contains empty variable names and builds successfully.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.