forked from loafle/openapi-generator-original
add a case to handle space in name
This commit is contained in:
parent
9453967815
commit
50f6067831
@ -1469,6 +1469,9 @@ public class DefaultCodegen {
|
|||||||
// input-name => input_name
|
// input-name => input_name
|
||||||
name = name.replaceAll("-", "_");
|
name = name.replaceAll("-", "_");
|
||||||
|
|
||||||
|
// input name and age => input_name_and_age
|
||||||
|
name = name.replaceAll(" ", "_");
|
||||||
|
|
||||||
// remove everything else other than word, number and _
|
// remove everything else other than word, number and _
|
||||||
// $php_variable => php_variable
|
// $php_variable => php_variable
|
||||||
return name.replaceAll("[^a-zA-Z0-9_]", "");
|
return name.replaceAll("[^a-zA-Z0-9_]", "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user