Open ossinkine opened 6 years ago
If I'm ready things right this is the problem in toEnumValue
return "\'" + escapeText(value)+ "\'";
I'm not sure I tracked down the scope correctly on what implementation of escapeText is used but if I did its the java version and its targeting double quoted strings which causes some problems.
The first is what we see here, single quotes aren't escaped so they're parsed by the interpreter. The second probably double quoted strings being escaped when they shouldn't be as well.
I was tempted to move to double quotes but $
is not escaped so that could lead to some even weirder problems... Tricky bug I guess i'll have to hack around in the short term.
Description
If enum values contain single quotes the codegen generates not valid PHP code.
Swagger-codegen version
2.4.0
Swagger declaration file content or url
Command line used for generation
Generated PHP-file contains syntax error