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

hotfix: invalid OpenAPI spec versions causing the app to crash #4559

Merged
merged 3 commits into from
Mar 9, 2022

Conversation

dimitropoulos
Copy link
Contributor

@dimitropoulos dimitropoulos commented Mar 8, 2022

OpenAPI specs do not support the number datatype for $.info.version. Only string is supported.
Screenshot_20220308_152427

In Insomnia, if you change this field to a number, you will see a lint error.
Screenshot_20220308_150027

Unfortunately, if you make this change and then flip to the dashboard, the following error appears:
Screenshot_20220308_150050

This leaves your application in a totally broken state and there is literally nothing you can do in the app, or do about it to fix it.
Screenshot_20220308_150138

This change was introduced in #4319 and would be preventable by spec validation (i.e. AJV) and/or functional TypeScript typings.

Our code is correct in the sense that it follows the spec. The problem is there's a failure-mode for an error case that is quite breaking.

Fixes INS-1477

@dimitropoulos
Copy link
Contributor Author

update: I figured out a temporary workaround while we get a patch released. see it here: https://youtu.be/D6yT20GPjZI

Copy link
Contributor

@gatzjames gatzjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Tested and works great!

@DMarby DMarby enabled auto-merge (squash) March 9, 2022 10:25
@DMarby DMarby merged commit 0867365 into Kong:develop Mar 9, 2022
@filfreire filfreire mentioned this pull request Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants