Skip to content

Commit 95ed847

Browse files
committed
fix(output): check if ChangedContent is null or not
1 parent 59eb9db commit 95ed847

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/qdesrame/openapi/diff/output/MarkdownRender.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ protected String itemHeader(String title, String mediaType, String description)
212212
}
213213

214214
protected String bodyContent(String prefix, ChangedContent changedContent) {
215+
if (changedContent == null) {
216+
return "";
217+
}
215218
StringBuilder sb = new StringBuilder("\n");
216219
sb.append(listContent(prefix, "New content type", changedContent.getIncreased()));
217220
sb.append(listContent(prefix, "Deleted content type", changedContent.getMissing()));

0 commit comments

Comments
 (0)