Rename property to be more language specific

This commit is contained in:
Mads Mætzke Tandrup 2015-07-25 12:03:17 +02:00
parent e924cec595
commit 81f5cc47e7
No known key found for this signature in database
GPG Key ID: 67056F406C84B14B
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ public class DefaultCodegen {
protected List<SupportingFile> supportingFiles = new ArrayList<SupportingFile>(); protected List<SupportingFile> supportingFiles = new ArrayList<SupportingFile>();
protected List<CliOption> cliOptions = new ArrayList<CliOption>(); protected List<CliOption> cliOptions = new ArrayList<CliOption>();
protected boolean skipOverwrite; protected boolean skipOverwrite;
protected boolean copyPropertiesFromParents = true; protected boolean supportsInheritance = false;
public List<CliOption> cliOptions() { public List<CliOption> cliOptions() {
return cliOptions; return cliOptions;
@ -534,7 +534,7 @@ public class DefaultCodegen {
final String parentRef = toModelName(parent.getSimpleRef()); final String parentRef = toModelName(parent.getSimpleRef());
m.parent = parentRef; m.parent = parentRef;
addImport(m, parentRef); addImport(m, parentRef);
if (copyPropertiesFromParents && allDefinitions != null) { if (!supportsInheritance && allDefinitions != null) {
final Model parentModel = allDefinitions.get(parentRef); final Model parentModel = allDefinitions.get(parentRef);
if (parentModel instanceof ModelImpl) { if (parentModel instanceof ModelImpl) {
final ModelImpl _parent = (ModelImpl) parentModel; final ModelImpl _parent = (ModelImpl) parentModel;

View File

@ -30,7 +30,7 @@ public class TypeScriptNodeClientCodegen extends DefaultCodegen implements Codeg
public TypeScriptNodeClientCodegen() { public TypeScriptNodeClientCodegen() {
super(); super();
copyPropertiesFromParents = false; supportsInheritance = true;
outputFolder = "generated-code/typescript-node"; outputFolder = "generated-code/typescript-node";
modelTemplateFiles.put("model.mustache", ".ts"); modelTemplateFiles.put("model.mustache", ".ts");
apiTemplateFiles.put("api.mustache", ".ts"); apiTemplateFiles.put("api.mustache", ".ts");