-
Notifications
You must be signed in to change notification settings - Fork 83
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
Trouble with generating an array of number enums #9
Comments
Sure, I will confirm it |
I fix it ,it will generate like this: type INumberArrayEnumModelFoo = 0 | 1 | 2 | 4 | 8;
export class NumberArrayEnumModel {
/** */
foo: INumberArrayEnumModelFoo[]
constructor(data?: any) {
if (data) {
this['foo'] = data['foo'];
}
}
} |
Thank you! |
You are welcome! |
Hi! I tried, your fix and found an error with it. When you have more than one number enum, the generator does not separate the types and creates file with wrong syntax. Created pull request with example to show, and a fix. Should, this be a separate issue, or can we track it in this one? Also, what is your release process, should I increase the version number and add the issue to the changelog ? |
I reopen this issue. |
@morbalint |
The generator removes an array from the swagger.json schema when the array contains a number enum.
simplified example:
the generated class will look something like this:
Sorry for the low quality example :(
I believe, I have found the error, and I will create a PR later.
Can you confirm its still an issue in your latest development branch ?
The text was updated successfully, but these errors were encountered: