diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index 9ad33e1d18aa..6539d49d1bba 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -41,7 +41,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { protected String modelDirName = "Model"; protected String variableNamingConvention= "snake_case"; protected String apiDocPath = docsBasePath + "/" + apiDirName; - protected String modelDocPath = docsBasePath + "docs/" + modelDirName; + protected String modelDocPath = docsBasePath + "/" + modelDirName; public PhpClientCodegen() { super(); @@ -233,6 +233,9 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { additionalProperties.put("apiDocPath", apiDocPath); additionalProperties.put("modelDocPath", modelDocPath); + // make test path available in mustache template + additionalProperties.put("testBasePath", testBasePath); + supportingFiles.add(new SupportingFile("configuration.mustache", toPackagePath(invokerPackage, srcBasePath), "Configuration.php")); supportingFiles.add(new SupportingFile("ApiClient.mustache", toPackagePath(invokerPackage, srcBasePath), "ApiClient.php")); supportingFiles.add(new SupportingFile("ApiException.mustache", toPackagePath(invokerPackage, srcBasePath), "ApiException.php")); diff --git a/modules/swagger-codegen/src/main/resources/php/composer.mustache b/modules/swagger-codegen/src/main/resources/php/composer.mustache index 510303ac2484..062a3ddc6cc2 100644 --- a/modules/swagger-codegen/src/main/resources/php/composer.mustache +++ b/modules/swagger-codegen/src/main/resources/php/composer.mustache @@ -31,6 +31,6 @@ "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" } }, "autoload-dev": { - "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" } + "psr-4": { "{{escapedInvokerPackage}}\\" : "{{testBasePath}}/" } } }