Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[javascript-flowtyped] Enum (uniontype) not excaped properly #514

Closed
shfx opened this issue Jul 9, 2018 · 1 comment · Fixed by #2665
Closed

[javascript-flowtyped] Enum (uniontype) not excaped properly #514

shfx opened this issue Jul 9, 2018 · 1 comment · Fixed by #2665

Comments

@shfx
Copy link

shfx commented Jul 9, 2018

Description

When openapi contains a enum type for any of the attributes and this enum contains ', enum union type is not escaped properly.

e.g.

export type CountriesHumanNameEnum = 'Andorra' | 'United Arab Emirates' | 'Afghanistan' | 'Antigua and Barbuda' | 'Anguilla' | 'Albania' | 'Armenia' | 
'Cote d'Ivoire' | // <- Here
'Mayotte' | 'South Africa' | 'Zambia' | 'Zimbabwe';
openapi-generator version

3.1.1-SNAPSHOT

Command line used for generation
openapi-generator generate -i https://example.com/api.json -g javascript-flowtyped -o openapi/client
Steps to reproduce
  1. Generate client code
  2. yarn
  3. yarn run build
Suggest a fix/enhancement

Escape string union types generated by openapi-generator

@macjohnny
Copy link
Member

related: swagger-api/swagger-codegen#7369

this should be fixed for all typescript / javascript generators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants