[html] Use ModelUtils to avoid NullPointerException (#1948)

This commit is contained in:
Jérémie Bresson
2019-01-20 17:51:18 +01:00
committed by William Cheng
parent c16354218a
commit 06824622bf
2 changed files with 14 additions and 1 deletions

View File

@@ -194,7 +194,7 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig
Info info = openAPI.getInfo();
info.setDescription(toHtml(info.getDescription()));
info.setTitle(toHtml(info.getTitle()));
Map<String, Schema> models = openAPI.getComponents().getSchemas();
Map<String, Schema> models = ModelUtils.getSchemas(openAPI);
for (Schema model : models.values()) {
model.setDescription(toHtml(model.getDescription()));
model.setTitle(toHtml(model.getTitle()));