Skip to content

Commit

Permalink
Add additional properties to Java CodegenModel (OpenAPITools#1854)
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 authored and wing328 committed Jan 9, 2019
1 parent 3002d00 commit 4ba1d52
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 4ba1d52

Please sign in to comment.