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

spectral:arazzo breaks with file not found in VSCode #2736

Open
erwinkramer opened this issue Nov 15, 2024 · 0 comments
Open

spectral:arazzo breaks with file not found in VSCode #2736

erwinkramer opened this issue Nov 15, 2024 · 0 comments

Comments

@erwinkramer
Copy link

Describe the bug
When using the Spectral VSCode extension i get the following output:

Using ruleset file: .
[Error - 12:53:55 AM] An error occurred while validating document c:\Users\erwin\bank-api\specs-generated\openapi.json: Unable to read ruleset at c:\Users\erwin\bank-api\.spectral.yml. Error: Could not load c:/Users/erwin/bank-api/spectral:arazzo (imported by .spectral.js): ENOENT: no such file or directory, open 'c:\Users\erwin\bank-api\spectral:arazzo'
seenDependencies (before): 0.

To Reproduce

Make a .spectral.yml file like this:

extends: ["spectral:oas", "spectral:arazzo"]

Then run it with VSCode and see it fails.

Then run it with the CLI and see the (supposedly fine) output:

spectral lint ./specs-generated/openapi.json -v -F "hint"
Found 78 rules (67 enabled)
Linting c:/Users/erwin/bank-api/specs-generated/openapi.json
No results with a severity of 'hint' or higher found!

Expected behavior
Should work. It works with Spectral CLI, so should work with VSCode too (or at least have a consistent result over all forms).

Environment (remove any that are not applicable):

  • Library version: latest
  • OS: WIndows 11

Additional context
You can easily test it on this repo: https://github.com/erwinkramer/bank-api?tab=readme-ov-file#bank-api

@erwinkramer erwinkramer changed the title spectral:arazzo with vscode breaks with file not found spectral:arazzo breaks with file not found in VSCode Nov 15, 2024
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

1 participant