Skip to content

Commit

Permalink
Add additional properties to Java CodegenModel
Browse files Browse the repository at this point in the history
Fixes the first part of OpenAPITools#1729 (comment) (see OpenAPITools#1729 (comment)). The second part was fixed by OpenAPITools#1845 (commit d65dd76).
  • Loading branch information
demonfiddler committed Jan 8, 2019
1 parent 293066b commit 7364077
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1436,4 +1436,13 @@ public void setParentVersion(final String parentVersion) {
public void setParentOverridden(final boolean parentOverridden) {
this.parentOverridden = parentOverridden;
}

@Override
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
super.addAdditionPropertiesToCodeGenModel(codegenModel, schema);

// See https://github.com/OpenAPITools/openapi-generator/pull/1729#issuecomment-449937728
codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema));
addImport(codegenModel, codegenModel.additionalPropertiesType);
}
}

0 comments on commit 7364077

Please sign in to comment.