-
Notifications
You must be signed in to change notification settings - Fork 57
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
Generated unsupport type bool
in enum class
#847
Comments
Hey @00Kai0 , looks like Python as a language can't handle bool enums. I'll do a better error message for this. However, looking at the swagger, I don't. think it makes sense to have this as an enum. Because it's a boolean, we already know its 2 possible values are true and false. What makes the most sense for the swagger, is to remove the object I've checked, and the only references to |
Hi @iscai-msft , do you know where this |
Since the enum is not defined with a name, m4 comes up with a name for it |
@iscai-msft, which enum did you mean for "Since the enum is not defined with a name"? For EnableHelmOperatorDefinition, it has the name EnableHelmOperatorType |
Hi @iscai-msft , I am sorry for responsing so late. I found this issue in two sdks: |
Still can't quite find it @00Kai0 , but autorest will assign a name to any unnamed model/ enum, so this enum must not be named. If you want to give it a name, you can add the name in the Once again, want to strongly strongly discourage adding these types of bool enums into the swagger. As you can see from the PR I have to fix these, there's no point in having these enums. All you need to do is set the parameter / property's type to |
Hi @iscai-msft
Track2 codegen generated an unsupport type: bug
I don't find this error in track1, so I think track2 codegen uses different logic here.
Another solution is that I add a
directive
in python.md to change the type in schema. Like thisI want to know should it be fixed in codegen ?
Import error:
The text was updated successfully, but these errors were encountered: