Skip to content

Commit 61bf45b

Browse files
committed
update typescript reserved word list to include local variable names
used in api methods
1 parent 3044563 commit 61bf45b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ public CodegenType getTag() {
1717
public AbstractTypeScriptClientCodegen() {
1818
super();
1919
supportsInheritance = true;
20-
reservedWords = new HashSet<String>(Arrays.asList("abstract", "await", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"));
20+
reservedWords = new HashSet<String>(Arrays.asList(
21+
// local variable names used in API methods (endpoints)
22+
"path", "queryParameters", "headerParams", "formParams", "useFormData", "deferred",
23+
"requestOptions",
24+
// Typescript reserved words
25+
"abstract", "await", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"));
2126

2227
languageSpecificPrimitives = new HashSet<String>(Arrays.asList(
2328
"String",

0 commit comments

Comments
 (0)