Skip to content
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

Error using the Rulesets #717

Open
fjd-anh opened this issue Jul 24, 2024 · 1 comment
Open

Error using the Rulesets #717

fjd-anh opened this issue Jul 24, 2024 · 1 comment

Comments

@fjd-anh
Copy link
Contributor

fjd-anh commented Jul 24, 2024

We use your rulesets to verify our API.
In our .spectral.yml we inport the rulesets via URL:

  - https://italia.github.io/api-oas-checker/spectral-generic.yml
  - https://italia.github.io/api-oas-checker/spectral-security.yml

This fails with "Invalid ruleset provided", as the URLs are no more working (HTTP 404).
So I fixed them to:

  - https://github.com/italia/api-oas-checker-rules/releases/latest/download/spectral-generic.yml
  - https://github.com/italia/api-oas-checker-rules/releases/latest/download/spectral-security.yml

But then, I get an error loading the checkSecurity.js:

Error running Spectral!
Error #1: Could not load https://github.com/italia/api-oas-checker-rules/releases/latest/download/functions/checkSecurity.js: Error fetching https://github.com/italia/api-oas-checker-rules/releases/latest/download/functions/checkSecurity.js: Not Found

The reason is, that checkSecurity.js is provided as a zip archive (functions.zip).

Can you please provide a public URL for the rulesets, with the functions side by side?

@simone-lungarella
Copy link

I also have the same issue while using spectral-full.yml:

[ERROR][2024-12-18 08:08:52] ...lsp/handlers.lua:623	"An error occurred while validating document /home/openapi.yml: Unable to read ruleset at https://github.com/italia/api-oas-checker-rules/releases/latest/download/spectral-full.yml. Error: Could not load https://github.com/italia/api-oas-checker-rules/releases/latest/download/functions/checkSecurity.js: Error fetching https://github.com/italia/api-oas-checker-rules/releases/latest/download/functions/checkSecurity.js: Not Found"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants