stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0 as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.35k stars 226 forks source link

Validation details are printed to console #2650

Open benjamin-mogensen opened 3 days ago

benjamin-mogensen commented 3 days ago

Chore summary When I use run method a lot of details about the validation are printed to console. I don't think this was the case in earlier versions.

E.g.:

const errorList = await spectral.run(oasDocument)

Tasks

Additional context Versions used

"@stoplight/spectral-core": "^1.18.3",
"@stoplight/spectral-parsers": "^1.0.3",
"@stoplight/spectral-ruleset-bundler": "^1.5.2",
"@stoplight/spectral-rulesets": "^1.19.1",
"@stoplight/spectral-runtime": "^1.1.2",

I found the line 155 in runner.js in@stoplight/json-ref-resolver:

console.log(Utils.uriToJSONPointer(ref), parentPath, ref, uriResolver)

But it seems that repo is now archived.

I have put in my package.json:

"@stoplight/json-ref-resolver": "^3.1.6"

That fixes it, but I am not sure if that is right approach as I assume that is not the version that is actually used as dependency for the other modules above.