added model ApiResponse, moved ApiResponse parameter

This commit is contained in:
Guo Huang
2016-04-23 16:41:14 -07:00
parent e7df5f9551
commit 7df5c8ffbf
8 changed files with 100 additions and 99 deletions

View File

@@ -51,7 +51,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
"case", "defer", "go", "map", "struct",
"chan", "else", "goto", "package", "switch",
"const", "fallthrough", "if", "range", "type",
"continue", "for", "import", "return", "var", "error")
"continue", "for", "import", "return", "var", "error", "ApiResponse")
// Added "error" as it's used so frequently that it may as well be a keyword
);
@@ -145,6 +145,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.go"));
supportingFiles.add(new SupportingFile("api_client.mustache", "", "api_client.go"));
supportingFiles.add(new SupportingFile("api_response.mustache", "", "api_response.go"));
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
}
@@ -324,7 +325,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
return swaggerType;
}
return camelize(swaggerType, false);
return toModelName(swaggerType);
}
@Override