Commit 6daa385
committed
Fix exception in ConsoleRender when property has been removed
`ConsoleRender` failed to resolve component schemas which had been
removed in the "new" OpenAPI specification and threw an
`IllegalArgumentException`:
```
Unexpected exception. Reason: ref '#/components/schemas/RemovedSchema' doesn't exist.
java.lang.IllegalArgumentException: ref '#/components/schemas/PermissionSet' doesn't exist.
at com.qdesrame.openapi.diff.core.utils.RefPointer.resolveRef(RefPointer.java:20)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.resolve(ConsoleRender.java:231)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.lambda$properties$1(ConsoleRender.java:217)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.properties(ConsoleRender.java:216)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.incompatibilities(ConsoleRender.java:199)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.lambda$incompatibilities$0(ConsoleRender.java:202)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.incompatibilities(ConsoleRender.java:202)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.incompatibilities(ConsoleRender.java:185)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.itemContent(ConsoleRender.java:179)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.ul_content(ConsoleRender.java:155)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.ol_changed(ConsoleRender.java:87)
at com.qdesrame.openapi.diff.core.output.ConsoleRender.render(ConsoleRender.java:47)
at com.qdesrame.openapi.diff.cli.Main.main(Main.java:159)
```1 parent 3c6f9af commit 6daa385
File tree
4 files changed
+82
-2
lines changed- core/src
- main/java/com/qdesrame/openapi/diff/core/output
- test
- java/com/qdesrame/openapi/test
- resources
4 files changed
+82
-2
lines changedLines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
| 216 | + | |
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments