mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 09:19:04 +00:00
[html] Use ModelUtils to avoid NullPointerException (#1948)
This commit is contained in:
committed by
William Cheng
parent
c16354218a
commit
06824622bf
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user