-
Notifications
You must be signed in to change notification settings - Fork 201
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
[BUG] Spectral linting not working #567
Comments
|
This should be fixed by #568 , thanks! |
@fabienmazieres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Release version
APIOps Toolkit for Azure APIM v5.1.4
Describe the bug
I believe the following line in the GitHub workflow does not work as expected, Spectral does not find any file to lint as it search for JSON/YAML files at the root of the apis folder rather than in any subfolder:
- run: spectral lint "${{ GITHUB.WORKSPACE }}/${{ inputs.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}\apis\*.{json,yml,yaml}" --ruleset https://raw.githubusercontent.com/connectedcircuits/devops-api-linter/main/rules.yaml
To execute tests on all subfolders, the code should include
\**\
in the file path, such as:- run: spectral lint "${{ GITHUB.WORKSPACE }}/${{ inputs.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}\apis\**\*.{json,yml,yaml}" --ruleset https://raw.githubusercontent.com/connectedcircuits/devops-api-linter/main/rules.yaml
Expected behavior
Spectral lint all files with the apis subfolders
Actual behavior
no linting is occuring
Reproduction Steps
create an invalid spec file in the apis folder and see if Spectral find the error.
The text was updated successfully, but these errors were encountered: