acacode / acacode/swagger-typescript-api

[Bug] Enums with quotes in the value throw errors

オープン
#990 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
4.1k
フォーク
436
PR マージ指標
30日以内にマージされた PR はありません

説明

Reproduction:

```sh
npx swagger-typescript-api -p https://id.casdoor.com/swagger/swagger.json -o ./casdoor
```

Results:
```sh
SyntaxError: An enum member name must be followed by a ',', '=', or '}'. (661:48)
659 | */
660 | export enum ObjectSubscriptionState {
> 661 | SubStatePendingPending = "SubStatePending = "Pending"",
| ^
662 | SubStateErrorError = "SubStateError = "Error"",
663 | SubStateSuspendedSuspended = "SubStateSuspended = "Suspended"",
664 | SubStateActiveActive = "SubStateActive = "Active"",
```

I think there is some kind of quote escaping rule that is failing here. the JSON has `"SubStatePending = \"Pending\""`, and I would expect to see the same thing in this output.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。