-
Notifications
You must be signed in to change notification settings - Fork 67
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 linting with updated spectral version #48
Comments
Hmm in the autobahn api still seems to be an issue that spectral does not show details about the linting errors/the pipeline dosen't fail because of them. |
Thats interesting. I thought it would not fail if there are only warnings but if there are errors it does. Can you create a test branch with a wrong yaml to be able to test this? Looks like spectral did a lot of changes with the newest versions. |
I added a yaml with errors here: Which seems to be right? |
More here: stoplightio/spectral-action#221 |
Looks like there is also an issue with pull_requests as seen in the autobahn-api. Not sure what special permission or tokens the spectral-action needs to perform linting, but it seems to be a problem. Lets see what the creators say: |
Spectral removed auto detection for openAPI schemas. Because of this, the linting fails when no .spectra.yaml is provided.
See: stoplightio/spectral#1796
In the Autobahn repo there is a .spectral.yaml file to account for that.
However, if we do not expect to use custom linting rulesets, we can simply get rid of this extra file by executing this before the linting process:
echo "extends: spectral:oas" > .spectral.yaml
The text was updated successfully, but these errors were encountered: