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
Expected behavior
I think the variable names in the generated enum would be hard to be meaningful, but perhaps the unicode codepoints could be used: U002D for minus-hyphen and U002B for plus sign.
Describe the bug
A json schema enumerated string type that has "-" as a possible value generates invalid code.
Generated code looks like this:
To Reproduce
This can be easily reproduced by changing the petstore example: definitions->order->status:
Expected behavior
I think the variable names in the generated enum would be hard to be meaningful, but perhaps the unicode codepoints could be used: U002D for minus-hyphen and U002B for plus sign.
Swagger specification link
https://gist.github.com/vipw/afcbd1afb71217b39875a9b88f5096cf
Library version used:
master
Additional context
I assume there are many other symbols that can't be naively mapped to dart variable names, despite being valid json strings.
The text was updated successfully, but these errors were encountered: