-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Linting/Validation does not default to "resolve" #20
Comments
I assume your first point refers to external references, and only those in that trigger the bug in your other issue (#21). If not, could you please elaborate? As to your second point, there is no notion of a default behaviour in this extension, because the validate/lint/resolve functionality is all manually selected from the command palette. Users can select a shortcut for whichever behaviour they prefer or just reuse the most recent command. The reason resolving was not folded into the earlier existing commands was to not change existing behaviour (for example if you are developing an OAS document but have not fleshed out the referenced files yet). |
Hmm, it must be another extension then that triggers the error. Sorry for the noise. I assumed this extension was running and linting my files automatically. I appreciate the resolve for external references in your plugin, it stopped me from going insane. |
No there is definitely something wrong. I disabled openapi-lint and i get no more openapi lint style errors when i save a file. I re-enabled it and disabled my one other openapi plug in, and if i save a file the lint errors appear. For example:
gets listed in the Problems page when i save a file. I can replicate this if i also run "OpenAPI Validate" manually. So it appears that yes, when I install and enable openapi-lint it is running a openapi validation on save (which is great) BUT its not resolving references, and it should. Running OpenAPI Resolve and Validate manually reports the document is valid. On save, if anything is run it should be "Resolve and Validate" it would be great to actually have an option to decide which is run on save "Validate". "Resolve and Validate", "Lint", "Resolve and Lint" or none. |
Ok, that sounds very reasonable. |
When you have a OAS3 document with references, the linter/validator throws errors like "component name invalid"
If you manually run "resolve and validate" it reports no errors.
Is there an actual reason to NOT resolve references if present?
Is there any way to make resolve & validate the default?
The text was updated successfully, but these errors were encountered: