swagger-api / swagger-api/swagger-codegen
[C#] Generating client with empty variable names
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
- Clone the repo
mvn clean package -Dmaven.test.skip=truejava -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- Because I also encountered this issue, I first fixed it.
- Restore nuget packages, build --> Errors
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
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