acacode / acacode/swagger-typescript-api
Enum that are negatives(-) are generated with the same name as positives(+)
- 主要言語
- TypeScript
- スター
- 4.1k
- フォーク
- 436
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
# Problem
When you have an enum with negatives(-) values and positive(+) values with the same number:

It produces an enum with the same name:

# Possible Solution
For generating names in Enums function need to parse the "-" to a "_" character, it will generate something like this:

# Steps to reproduce
- Create a swagger api with enums with a negative and a positive number (with the same number Ex: -1,1 or -2,2 or -3,3 or so on)
- Run the command: `npx swagger-typescript-api -p http://localhost/api-json --extract-enums`
- The generated enum will have the same name for both `-1 and 1`
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。