Skip to content

Commit

Permalink
added parent if it was not assigned by parser on allOf composed model
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMario committed Jul 5, 2020
1 parent c30a364 commit c191bcd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,12 @@ public CodegenModel fromModel(String name, Model model, Map<String, Model> allDe
List<String> required = new ArrayList<String>();
Map<String, Property> allProperties;
List<String> allRequired;

List<Model> allComponents = composed.getAllOf();
if (allComponents.size() > 0 && composed.getParent() == null) {
composed.setParent(allComponents.get(0));
}

if (supportsInheritance || supportsMixins) {
allProperties = new LinkedHashMap<String, Property>();
allRequired = new ArrayList<String>();
Expand Down

0 comments on commit c191bcd

Please sign in to comment.