forked from loafle/openapi-generator-original
[Flask] self and None are reserved words (#6111)
* setReservedWordsLowerCase was called twice, the second time without self and None * True, False and nonlocal are python3 reserved words
This commit is contained in:
parent
dad3e6018a
commit
6b85416f47
@ -69,7 +69,7 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
typeMapping.put("file", "file");
|
typeMapping.put("file", "file");
|
||||||
typeMapping.put("UUID", "str");
|
typeMapping.put("UUID", "str");
|
||||||
|
|
||||||
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
// from https://docs.python.org/3/reference/lexical_analysis.html#keywords
|
||||||
setReservedWordsLowerCase(
|
setReservedWordsLowerCase(
|
||||||
Arrays.asList(
|
Arrays.asList(
|
||||||
// @property
|
// @property
|
||||||
@ -78,7 +78,7 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
||||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
||||||
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
||||||
"return", "def", "for", "lambda", "try", "self", "None"));
|
"return", "def", "for", "lambda", "try", "self", "None", "True", "False", "nonlocal"));
|
||||||
|
|
||||||
// set the output folder here
|
// set the output folder here
|
||||||
outputFolder = "generated-code/connexion";
|
outputFolder = "generated-code/connexion";
|
||||||
@ -93,14 +93,6 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
*/
|
*/
|
||||||
embeddedTemplateDir = templateDir = "flaskConnexion";
|
embeddedTemplateDir = templateDir = "flaskConnexion";
|
||||||
|
|
||||||
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
|
||||||
setReservedWordsLowerCase(
|
|
||||||
Arrays.asList(
|
|
||||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
|
||||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
|
||||||
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
|
||||||
"return", "def", "for", "lambda", "try"));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Additional Properties. These values can be passed to the templates and
|
* Additional Properties. These values can be passed to the templates and
|
||||||
* are available in models, apis, and supporting files
|
* are available in models, apis, and supporting files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user