You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating types with options --union-enums --extract-enums throws this error and TS file is not generated for a specific openapi.yml file. I cannot remove --extract-enums as it's part of our configuration for the whole app.
I believe a terminating semicolon is not added by swagger-typescript-api@12.0.4 causing this error to be thrown it attempts when format with prettier:
SyntaxError: ';' expected. (1604:10)
1602 | * @example "payout_interest"
1603 | */
> 1604 | export type DepositInterestTreatment = "capitalize_interest" | "payout_interest"
| ^
1605 |
1606 | /**
1607 | * Current state of the deposit.
at Ve (~/.npm/_npx/40e7642a532d5314/node_modules/prettier/parser-typescript.js:1:15607)
at vz (~/.npm/_npx/40e7642a532d5314/node_modules/prettier/parser-typescript.js:280:5919)
at Object.yz [as parse] ~/.npm/_npx/40e7642a532d5314/node_modules/prettier/parser-typescript.js:280:6242)
The text was updated successfully, but these errors were encountered:
MiracleUFO
changed the title
[Bug] Parser option --extract-enums fails to generate due to linting error in version 12.0.4
[Bug] v 12.0.4 Parser option --extract-enums fails to generate with prettier linting error to generate
Aug 27, 2024
I do not want to upgrade to ^13.0.0 because when I used it last I got a circular dependency error and had to downgrade.
MiracleUFO
changed the title
[Bug] v 12.0.4 Parser option --extract-enums fails to generate with prettier linting error to generate
[Bug] 12.0.4 Parser option --extract-enums fails to generate with prettier linting error to generate
Aug 27, 2024
Command:
npx [email protected] -p .dev-helper/openapi.yml -o $target_folder -n index.ts --union-enums --extract-enums
Generating types with options
--union-enums --extract-enums
throws this error and TS file is not generated for a specific openapi.yml file. I cannot remove--extract-enums
as it's part of our configuration for the whole app.I believe a terminating semicolon is not added by swagger-typescript-api@12.0.4 causing this error to be thrown it attempts when format with prettier:
The text was updated successfully, but these errors were encountered: