|
16 | 16 | import static j2html.TagCreator.meta; |
17 | 17 | import static j2html.TagCreator.ol; |
18 | 18 | import static j2html.TagCreator.p; |
| 19 | +import static j2html.TagCreator.pre; |
19 | 20 | import static j2html.TagCreator.span; |
20 | 21 | import static j2html.TagCreator.title; |
21 | 22 | import static j2html.TagCreator.ul; |
|
33 | 34 | import j2html.tags.specialized.HtmlTag; |
34 | 35 | import j2html.tags.specialized.LiTag; |
35 | 36 | import j2html.tags.specialized.OlTag; |
| 37 | +import j2html.tags.specialized.SpanTag; |
36 | 38 | import j2html.tags.specialized.UlTag; |
37 | 39 | import java.io.IOException; |
38 | 40 | import java.io.OutputStreamWriter; |
|
56 | 58 | import org.openapitools.openapidiff.core.model.DiffContext; |
57 | 59 | import org.openapitools.openapidiff.core.model.DiffResult; |
58 | 60 | import org.openapitools.openapidiff.core.model.Endpoint; |
| 61 | +import org.openapitools.openapidiff.core.model.schema.ChangedOperationId; |
59 | 62 | import org.openapitools.openapidiff.core.utils.RefPointer; |
60 | 63 | import org.openapitools.openapidiff.core.utils.RefType; |
61 | 64 |
|
@@ -202,6 +205,11 @@ private OlTag ol_changed(List<ChangedOperation> changedOperations) { |
202 | 205 | .orElse(""); |
203 | 206 |
|
204 | 207 | UlTag ul_detail = ul().withClass("detail"); |
| 208 | + if (result(changedOperation.getOperationId()).isDifferent()) { |
| 209 | + ul_detail.with( |
| 210 | + li().with(h3("Operation ID")).with(ul_operation_id(changedOperation.getOperationId())) |
| 211 | + ); |
| 212 | + } |
205 | 213 | if (result(changedOperation.getParameters()).isDifferent()) { |
206 | 214 | ul_detail.with( |
207 | 215 | li().with(h3("Parameters")).with(ul_param(changedOperation.getParameters()))); |
@@ -561,4 +569,12 @@ private LiTag li_changedParam(ChangedParameter changeParam) { |
561 | 569 | } |
562 | 570 | return li; |
563 | 571 | } |
| 572 | + |
| 573 | + private UlTag ul_operation_id(ChangedOperationId changedOperationId) { |
| 574 | + SpanTag spanTag = span("Changed"); |
| 575 | + spanTag.with(pre(changedOperationId.getLeft())); |
| 576 | + spanTag.withText("to"); |
| 577 | + spanTag.with(pre(changedOperationId.getRight())); |
| 578 | + return ul().withClass("change").with(li().with(spanTag)); |
| 579 | + } |
564 | 580 | } |
0 commit comments