Skip to content

Commit 36ffa53

Browse files
committed
Apply code formatting
1 parent ec81dc3 commit 36ffa53

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

core/src/main/java/org/openapitools/openapidiff/core/output/AsciidocRender.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ private void ol_changed(
107107
if (result(operation.getOperationId()).isDifferent()) {
108108
safelyAppend(outputStreamWriter, "* Operation ID:");
109109
safelyAppend(outputStreamWriter, System.lineSeparator());
110-
safelyAppend(outputStreamWriter, String.format("** Changed %s to %s", operation.getOperationId().getLeft(), operation.getOperationId().getRight()));
110+
safelyAppend(
111+
outputStreamWriter,
112+
String.format(
113+
"** Changed %s to %s",
114+
operation.getOperationId().getLeft(), operation.getOperationId().getRight()));
111115
safelyAppend(outputStreamWriter, System.lineSeparator());
112116
}
113117
if (result(operation.getParameters()).isDifferent()) {

core/src/main/java/org/openapitools/openapidiff/core/output/HtmlRender.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import static j2html.TagCreator.meta;
1717
import static j2html.TagCreator.ol;
1818
import static j2html.TagCreator.p;
19-
import static j2html.TagCreator.pre;
2019
import static j2html.TagCreator.span;
2120
import static j2html.TagCreator.title;
2221
import static j2html.TagCreator.ul;
@@ -34,7 +33,6 @@
3433
import j2html.tags.specialized.HtmlTag;
3534
import j2html.tags.specialized.LiTag;
3635
import j2html.tags.specialized.OlTag;
37-
import j2html.tags.specialized.SpanTag;
3836
import j2html.tags.specialized.UlTag;
3937
import java.io.IOException;
4038
import java.io.OutputStreamWriter;
@@ -207,8 +205,7 @@ private OlTag ol_changed(List<ChangedOperation> changedOperations) {
207205
UlTag ul_detail = ul().withClass("detail");
208206
if (result(changedOperation.getOperationId()).isDifferent()) {
209207
ul_detail.with(
210-
li().with(h3("Operation ID")).with(ul_operation_id(changedOperation.getOperationId()))
211-
);
208+
li().with(h3("Operation ID")).with(ul_operation_id(changedOperation.getOperationId())));
212209
}
213210
if (result(changedOperation.getParameters()).isDifferent()) {
214211
ul_detail.with(
@@ -571,13 +568,12 @@ private LiTag li_changedParam(ChangedParameter changeParam) {
571568
}
572569

573570
private UlTag ul_operation_id(ChangedOperationId changedOperationId) {
574-
return ul().withClass("change").with(
575-
li().withText(
576-
"Changed " +
577-
Optional.ofNullable(changedOperationId.getLeft()).orElse("") +
578-
" to " +
579-
Optional.ofNullable(changedOperationId.getRight()).orElse("")
580-
)
581-
);
571+
return ul().withClass("change")
572+
.with(
573+
li().withText(
574+
"Changed "
575+
+ Optional.ofNullable(changedOperationId.getLeft()).orElse("")
576+
+ " to "
577+
+ Optional.ofNullable(changedOperationId.getRight()).orElse("")));
582578
}
583579
}

core/src/main/java/org/openapitools/openapidiff/core/output/MarkdownRender.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,8 @@ protected String metadata(String beginning, String name, ChangedMetadata changed
547547
}
548548

549549
protected String operationId(ChangedOperationId operationId) {
550-
return String.format("\nChanged: %s to %s\n\n", code(operationId.getLeft()), code(operationId.getRight()));
550+
return String.format(
551+
"\nChanged: %s to %s\n\n", code(operationId.getLeft()), code(operationId.getRight()));
551552
}
552553

553554
protected String metadata(String metadata) {

core/src/test/java/org/openapitools/openapidiff/core/backcompat/OperationBCTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public void operationIdChangedButCompatible() {
2727

2828
@Test
2929
public void operationIdChangedInCompatibleWithFlagSet() {
30-
assertSpecIncompatible(BASE, "bc_operation_changed_incompatible_operation_id.yaml", BackwardIncompatibleProp.OPERATION_ID_CHANGED);
30+
assertSpecIncompatible(
31+
BASE,
32+
"bc_operation_changed_incompatible_operation_id.yaml",
33+
BackwardIncompatibleProp.OPERATION_ID_CHANGED);
3134
}
3235
}

0 commit comments

Comments
 (0)