-
Notifications
You must be signed in to change notification settings - Fork 6
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
Parsing other yaml files leads to problem report without a source #51
Comments
Thanks for the report @eseglem 🙌 @tatomyr @roman-sainchuk just making sure you see this ☝️ |
Hi @eseglem, What exactly do you mean by custom tags? |
@tatomyr Custom tags being any local tags that aren't specifically part of the yaml spec. They are left up to the application to handle. Pretty much anything with an In my case they are completely independent and unrelated to openapi. You don't even need to have an openapi definition file to see the problem show up. Isolated steps to reproduce:
|
@eseglem Thanks for reporting! The issue is that extension cannot parse this yaml file so we cannot even determine if the file is the openapi spec or not. |
@roman-sainchuk how about if we try to detect openapi from plaintext somehow and show errors only in such case? |
@RomanHotsiy great idea! We'll try to implement it, thanks! |
I don't think its a horrible thing to report an error, my main issue was that the error does not say it's coming from the Redocly extension. If you catch it and report the error with a source that would be enough to address that concern. Though I would prefer to see a way to configure which files it tries to parse. Then I could tell it not to do those files. I may have many yaml files across many folders in a repo, but any openapi yaml are in one folder. There is no reason the extension needs to look at the other ones. |
What happened?
The extension tries to read all yaml files in the workspace and not all of them are OpenAPI. Any yaml with custom tags seem to confuse the extension. Rather than reporting nicely, it ends up with a problem without a "source".
What should have happened instead?
Minimal reproducible
OpenAPIsnippetCloudFormation from: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/gettingstarted.templatebasics.html
Additional context
This made it quite difficult to track down where the reported problem was coming from. It required disabling extensions until the problem disappeared to figure out it was Redocly.
The text was updated successfully, but these errors were encountered: