Skip to content

Commit ae1d05b

Browse files
committed
Report changes in parent's props alongside with the child's
1 parent 9968702 commit ae1d05b

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -192,31 +192,31 @@ private void incompatibility(
192192
.append(System.lineSeparator());
193193
});
194194
}
195-
} else {
196-
if (changed instanceof ChangedSchema) {
197-
ChangedSchema cs = (ChangedSchema) changed;
195+
}
198196

199-
String description = null;
200-
if (!cs.getChangedProperties().isEmpty()) {
201-
description = cs.getChangedProperties().keySet().stream().collect(Collectors.joining());
202-
} else if (cs.getItems() != null) {
203-
description = "[n]";
204-
}
205-
final String prefix = propPrefix + description + ".";
206-
cs.getChangedElements().stream()
207-
.forEach(
208-
(c) -> {
209-
if (c != null && c instanceof ComposedChanged) {
210-
incompatibility(output, (ComposedChanged) c, prefix);
211-
}
212-
});
213-
return;
197+
if (changed instanceof ChangedSchema) {
198+
ChangedSchema cs = (ChangedSchema) changed;
199+
200+
String description = null;
201+
if (!cs.getChangedProperties().isEmpty()) {
202+
description = cs.getChangedProperties().keySet().stream().collect(Collectors.joining());
203+
} else if (cs.getItems() != null) {
204+
description = "[n]";
214205
}
206+
final String prefix = propPrefix + description + ".";
207+
cs.getChangedElements().stream()
208+
.forEach(
209+
(c) -> {
210+
if (c != null && c instanceof ComposedChanged) {
211+
incompatibility(output, (ComposedChanged) c, prefix);
212+
}
213+
});
214+
return;
215+
}
215216

216-
for (Changed child : changed.getChangedElements()) {
217-
if (child instanceof ComposedChanged) {
218-
incompatibility(output, (ComposedChanged) child, "");
219-
}
217+
for (Changed child : changed.getChangedElements()) {
218+
if (child instanceof ComposedChanged) {
219+
incompatibility(output, (ComposedChanged) child, "");
220220
}
221221
}
222222
}

0 commit comments

Comments
 (0)