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
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_VALUE in the swagger enum will generate the name 123ENUMVALUE which is invalid typescript because it starts with a number. Expected name would probably be to keep _123_ENUM_VALUE on 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_VALUE in the swagger enum will generate the name ENUM123VALUE. Expected typescript name would be ENUM_123_VALUE with underscores intact because it's valid typescript as-is.
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.