-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Invalid Spec Leads to Error Without Init Callback #690
Comments
is not an empty tag. It is equivalent to: - null So this is not valid spec as tags should be an array of To fix your spec you can use empty string: - "" |
@RomanGotsiy The issue is not the validity of the spec. The issue is that there is no way to recover from this in a solution leveraging ReDoc because the callback on init() is not honored. The ReDoc documentation says that the callback is called in the cases of an error, but in this case it is not. |
@rosshardy ahh, got it. Sorry. |
For additional context of the use case: we are trying to build a VSCode plugin which previews specs real-time as they are being built out or modified. However when the user edits tags and clears the tag out, the preview bombs out and there's no apparent way to recover ReDoc after the user corrects the spec. |
😲This sounds super exciting! Is there any chance I can take a sneak peek of it? I will look into the issue ASAP (most likely tomorrow morning). |
At the current time we are not permitted by our company to open source our efforts, however we would like to contribute it back to the community so others can benefit from it as we benefit from much open-source. We are working on changing our company's position on this. If that happens, we would be happy to share it. Thank you for looking into it promptly! |
Fixed! Will be released in the upcoming alpha.
Could you at least share a screenshot or a gif of it with me privatelly? E.g. DM on twitter. I'm super curious 🤓 |
Yes. E-mailed it to you. Thanks again for the prompt turnaround! |
@RomanGotsiy any estimate when the next alpha build will be released? Thank you. |
Will be released early this week. |
Will the release be coming soon? Thanks! |
@rosshardy Check out |
Is there a reason this slugify error may occur inside of a json file? I've been looking for a while but I haven't found anything simlar to a hyphen without a string. The error message isn't very descriptive and I can't really figure out what's wrong.
|
Hello. In ReDoc 2.0.0-alpha.40 when generating ReDoc from a YAML file with a path with an empty tag (only the hyphen) ReDoc results in a "Something went wrong..." page with the below stack trace. The callback provided to init() is not invoked, so the surrounding application cannot recover from the error.
The text was updated successfully, but these errors were encountered: