forked from loafle/openapi-generator-original
python: Fix escaping of quote in patterns
This commit is contained in:
parent
dd1ed12318
commit
a4dbd761f8
@ -203,7 +203,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
+ "/pattern/modifiers convention. "+pattern+" is not valid.");
|
||||
}
|
||||
|
||||
String regex = pattern.substring(1, i).replace("'", "\'");
|
||||
String regex = pattern.substring(1, i).replace("'", "\\'");
|
||||
List<String> modifiers = new ArrayList<String>();
|
||||
|
||||
for(char c : pattern.substring(i).toCharArray()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user