-
-
Notifications
You must be signed in to change notification settings - Fork 426
Description
When generating enums (without --union-enums), there are two things that can happen when there are numbers in the enum values:
-
An enum value prefixed with underscore and a number will result in invalid code being generated. For example
_123_ENUM_VALUEin the swagger enum will generate the name123ENUMVALUEwhich is invalid typescript because it starts with a number. Expected name would probably be to keep_123_ENUM_VALUEon the typescript side as well. -
An enum value with numbers anywhere in it is has underscores stripped from the generated name (reminiscent of Underscores are omitted from enum keys #108). For example
ENUM_123_VALUEin the swagger enum will generate the nameENUM123VALUE. Expected typescript name would beENUM_123_VALUEwith underscores intact because it's valid typescript as-is.