set auth, request package based on invokerPacakge (#6200)

This commit is contained in:
wing328 2017-07-28 13:31:47 +08:00 committed by GitHub
parent a6f594bfd2
commit cd43ad8c62

View File

@ -355,9 +355,13 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
this.setRequestPackage(invokerPackage + ".request");
this.setAuthPackage(invokerPackage + ".auth");
} else {
//not set, use default to be passed to template
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);
additionalProperties.put("requestPackage", requestPackage);
additionalProperties.put("authPackage", authPackage);
}
if (additionalProperties.containsKey(CodegenConstants.GROUP_ID)) {
@ -549,6 +553,14 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
this.invokerPackage = invokerPackage;
}
public void setRequestPackage(String requestPackage) {
this.requestPackage = requestPackage;
}
public void setAuthPackage(String authPackage) {
this.authPackage = authPackage;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}