Skip to content

Commit

Permalink
Merge pull request #9615 from leiferksn/master
Browse files Browse the repository at this point in the history
#8808 NPE while generating static HTML from validated swagger.yaml
  • Loading branch information
frantuma authored Aug 21, 2019
2 parents 0d372e5 + 11c4169 commit 6fdeffc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void preprocessSwagger(Swagger swagger) {
Info info = swagger.getInfo();
info.setDescription(toHtml(info.getDescription()));
info.setTitle(toHtml(info.getTitle()));
Map<String, Model> models = swagger.getDefinitions();
Map<String, Model> models = swagger.getDefinitions() != null ? swagger.getDefinitions() : new HashMap<String, Model>();
for (Model model : models.values()) {
model.setDescription(toHtml(model.getDescription()));
model.setTitle(toHtml(model.getTitle()));
Expand Down

0 comments on commit 6fdeffc

Please sign in to comment.