Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception in ConsoleRender when property has been removed #7

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

joschi
Copy link
Owner

@joschi joschi commented Jun 24, 2020

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)

@joschi joschi added the bug Something isn't working label Jun 24, 2020
@joschi joschi self-assigned this Jun 24, 2020
`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)
```
@joschi joschi force-pushed the console-render-missing-property branch from b3b1d99 to 6daa385 Compare June 24, 2020 07:42
@joschi joschi merged commit d348630 into master Jun 24, 2020
@joschi joschi deleted the console-render-missing-property branch June 24, 2020 07:47
joschi added a commit that referenced this pull request Jun 24, 2020
`HtmlRender` and `MarkdownRender` failed to resolve component schemas which had been removed in the "new" OpenAPI specification and threw an `IllegalArgumentException`.

Refs #7
joschi added a commit that referenced this pull request Jun 24, 2020
`HtmlRender` and `MarkdownRender` failed to resolve component schemas which had been removed in the "new" OpenAPI specification and threw an `IllegalArgumentException`.

Refs #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant