resolve conflict during rebase

This commit is contained in:
wing328
2015-04-06 18:03:15 +08:00
parent 2bb42a1147
commit 3811a5a209
21 changed files with 266 additions and 88 deletions

View File

@@ -27,7 +27,14 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
public PhpClientCodegen() {
super();
modelPackage = "models";
//TODO determine hte package name from host name
invokerPackage = camelize("SwaggerPetstore");
String packagePath = invokerPackage + "-php";
modelPackage = packagePath + "/lib/models";
apiPackage = packagePath + "/lib";
outputFolder = "generated-code/php";
modelTemplateFiles.put("model.mustache", ".php");
apiTemplateFiles.put("api.mustache", ".php");
@@ -59,7 +66,10 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("List", "array");
typeMapping.put("map", "map");
supportingFiles.add(new SupportingFile("Swagger.mustache", "", "Swagger.php"));
supportingFiles.add(new SupportingFile("composer.mustache", packagePath, "composer.json"));
supportingFiles.add(new SupportingFile("APIClient.mustache", packagePath + "/lib", "APIClient.php"));
supportingFiles.add(new SupportingFile("APIClientException.mustache", packagePath + "/lib", "APIClientException.php"));
supportingFiles.add(new SupportingFile("require.mustache", packagePath, invokerPackage + ".php"));
}
@Override