swagger-api / swagger-api/swagger-codegen
[C#] Generated Csharp SDK enum names have '_' missing
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
We generated Csharp SDK using swagger codegen and we had some enums in our JSON having names eg FIRST_ENUM . Now when the SDK got generated we see the Enum name changed to FIRSTENUM . It reduces the readability of our SDK . Why is that so ?
Swagger-codegen version
Swagger Codegen version: 2.3.1-SNAPSHOT
Command line used for generation
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i json/sample.json -l csharp -o ~/Desktop/SDK/CSharpSDK -DdateLibrary=legacy
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 by reproducing the issue with the documented swagger-codegen-cli.jar command, using json/sample.json and the csharp generator. Compare enum names in the input JSON with those in the generated CSharpSDK. Done means generated enum names retain the underscores without reducing other identifier conversions.
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