Skip to content

Commit

Permalink
Merge processOpts() into AbstractPhpCodegen
Browse files Browse the repository at this point in the history
  • Loading branch information
ackintosh committed Jul 8, 2018
1 parent 0356486 commit 4e7b7af
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,28 @@ public void processOpts() {

if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));

// Update the invokerPackage for the default apiPackage and modelPackage
apiPackage = invokerPackage + "\\" + apiDirName;
modelPackage = invokerPackage + "\\" + modelDirName;
} else {
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);
}

if (!additionalProperties.containsKey(CodegenConstants.MODEL_PACKAGE)) {
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage);
} else {
// Update model package to contain the specified model package name and the invoker package
modelPackage = invokerPackage + "\\" + (String) additionalProperties.get(CodegenConstants.MODEL_PACKAGE);
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage);
}

if (!additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) {
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage);
} else {
// Update api package to contain the specified api package name and the invoker package
apiPackage = invokerPackage + "\\" + (String) additionalProperties.get(CodegenConstants.API_PACKAGE);
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage);
}

// if (additionalProperties.containsKey(COMPOSER_PROJECT_NAME)) {
Expand Down

0 comments on commit 4e7b7af

Please sign in to comment.