Skip to content

Commit

Permalink
Merge pull request #532 from swagger-api/csharp-npe-issue
Browse files Browse the repository at this point in the history
fixed npe on charp code generation
  • Loading branch information
HugoMario authored Nov 9, 2019
2 parents 363580c + c8a0f5f commit 5a1cfa7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public CodegenModel fromModel(String name, Schema schema, Map<String, Schema> al
if (allDefinitions != null && codegenModel != null && codegenModel.parent != null) {
final Schema parentModel = allDefinitions.get(toModelName(codegenModel.parent));
if (parentModel != null) {
final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, parentModel);
final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, parentModel, allDefinitions);
boolean hasEnums = getBooleanValue(codegenModel, HAS_ENUMS_EXT_NAME);
if (hasEnums) {
codegenModel = this.reconcileInlineEnums(codegenModel, parentCodegenModel);
Expand Down Expand Up @@ -821,4 +821,4 @@ public Mustache.Compiler processCompiler(Mustache.Compiler compiler) {
// To avoid unexpected behaviors when options are passed programmatically such as { "supportsAsync": "" }
return super.processCompiler(compiler).emptyStringIsFalse(true);
}
}
}

0 comments on commit 5a1cfa7

Please sign in to comment.