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

Broken types for arrays of union types #49

Closed
jabrandes opened this issue May 29, 2020 · 3 comments
Closed

Broken types for arrays of union types #49

jabrandes opened this issue May 29, 2020 · 3 comments

Comments

@jabrandes
Copy link

The latest release update (version 1.8.1) introduced array types using the typical brackets-suffixed notation (${content}[]). However, the generator seems to produce faulty type definitions when the array is to contain a union of types or a union of enum values. That problem has not occured with previous versions using the Array<T> notation. An easy fix respecting the intentions of release 1.8.1 may be to put the content type inside parentheses to which the brackets-suffix can be applied.

Screenshots of the problem

Original Swagger definition:
image

Generated code: 1.8.1 generated type to the left, pre-1.8.1 generated type to the right
image

@js2me
Copy link
Member

js2me commented May 29, 2020

@jabrandes Hello! Thanks for the issue report!
I will fix it right now!

@jabrandes
Copy link
Author

@js2me Thanks a lot! 😃

@js2me js2me mentioned this issue May 29, 2020
@js2me
Copy link
Member

js2me commented May 29, 2020

It should be fixed in release 1.8.2 🙂

@js2me js2me closed this as completed May 29, 2020
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

No branches or pull requests

2 participants