forked from loafle/openapi-generator-original
fix NPE in the C# Nancy generator (#1478)
This commit is contained in:
parent
c656194f22
commit
941b3ea015
@ -285,6 +285,7 @@ public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen {
|
||||
LOGGER.debug("Processing parents: " + parentModels);
|
||||
for (final String parent : parentModels) {
|
||||
final CodegenModel parentModel = ModelUtils.getModelByName(parent, models);
|
||||
if (parentModel != null) {
|
||||
parentModel.hasChildren = true;
|
||||
final Collection<CodegenModel> childrenModels = childrenByParent.get(parent);
|
||||
for (final CodegenModel child : childrenModels) {
|
||||
@ -292,6 +293,7 @@ public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processParentPropertiesInChildModel(final CodegenModel parent, final CodegenModel child) {
|
||||
final Map<String, CodegenProperty> childPropertiesByName = new HashMap<>(child.vars.size());
|
||||
|
Loading…
x
Reference in New Issue
Block a user