mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
null check
This commit is contained in:
@@ -259,7 +259,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
|
||||
private Model getParent(Model model) {
|
||||
if (model instanceof ComposedModel) {
|
||||
return definitions.get(((ComposedModel) model).getParent().getReference());
|
||||
Model parent = ((ComposedModel) model).getParent();
|
||||
if(parent != null) {
|
||||
return definitions.get(parent.getReference());
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user