forked from loafle/openapi-generator-original
added null check for simple definitions with no models
This commit is contained in:
parent
caaa753f58
commit
2ed8e10fe4
@ -71,6 +71,7 @@ public class DefaultGenerator implements Generator {
|
||||
|
||||
// models
|
||||
Map<String, Model> definitions = swagger.getDefinitions();
|
||||
if(definitions != null) {
|
||||
for(String name: definitions.keySet()) {
|
||||
Model model = definitions.get(name);
|
||||
Map<String, Model> modelMap = new HashMap<String, Model>();
|
||||
@ -95,6 +96,7 @@ public class DefaultGenerator implements Generator {
|
||||
writeToFile(filename, tmpl.execute(models));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(System.getProperty("debugModels") != null) {
|
||||
System.out.println("############ Model info ############");
|
||||
Json.prettyPrint(allModels);
|
||||
|
Loading…
x
Reference in New Issue
Block a user