Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ protected String listEndpoints(List<ChangedOperation> changedOperations) {
if (operation.resultRequestBody().isDifferent()) {
details
.append(titleH5("Request:"))
.append(metadata("Description", operation.getRequestBody().getDescription()))
.append(bodyContent(operation.getRequestBody().getContent()));
}
if (operation.resultApiResponses().isDifferent()) {
Expand Down Expand Up @@ -212,6 +213,9 @@ protected String itemHeader(String title, String mediaType, String description)
}

protected String bodyContent(String prefix, ChangedContent changedContent) {
if (changedContent == null) {
return "";
}
StringBuilder sb = new StringBuilder("\n");
sb.append(listContent(prefix, "New content type", changedContent.getIncreased()));
sb.append(listContent(prefix, "Deleted content type", changedContent.getMissing()));
Expand Down Expand Up @@ -499,7 +503,7 @@ protected String metadata(String beginning, String name, ChangedMetadata changed
if (changedMetadata == null) {
return "";
}
if (isUnchanged(changedMetadata) && showChangedMetadata) {
if (!isUnchanged(changedMetadata) && showChangedMetadata) {
return format(
"Changed %s:\n%s\nto:\n%s\n\n",
name,
Expand Down