You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An indentation error in a custom ruleset lead to a confusing error from spectral, leaving the user in an unclear state.
Spectral v6.4.1:
$ spectral lint example.yaml -r apisyouwonthate.yml
Error running Spectral!
Use --verbose flag to print the error stack.
Error #1: [object Object]
$ spectral lint example.yaml -r apisyouwonthate.yml --verbose
Error running Spectral!
Error #1: [object Object]
Spectral 6.2.0:
$ spectral lint example.yaml -r apisyouwonthate.yml
Error at #/: must NOT have additional properties
To Reproduce
Given any OpenAPI document and this ruleset .spectral.yml:
rules:
api-home:
description: APIs MUST have a root path defined (`/`), to stop forcing all API consumers to visit documentation for basic interactions.severity: errorgiven: $.pathsthen:
field: /function: truthyno-global-versioning:
message: Server URL should not contain global versionsgiven: $.servers[*].urlthen:
function: patternfunctionOptions:
notMatch: /v[1-9]formats: oas3severity: warn
Run this CLI command spectral lint https://raw.githubusercontent.com/stoplightio/Public-APIs/master/reference/plaid/openapi.yaml
See error
Expected behavior
An error that explains my ruleset is invalid, ideally pointing to what I did wrong and where.
Error #1: Ruleset contained an unexpected key `no-global-versioning:`
or
Error #1: Ruleset should only contain `extends`, `formats`, or `rules` at the top level.
Something like that.
Environment (remove any that are not applicable):
Library version: Spectral CLI v6.4.1
OS: macOS
The text was updated successfully, but these errors were encountered:
Describe the bug
An indentation error in a custom ruleset lead to a confusing error from spectral, leaving the user in an unclear state.
Spectral v6.4.1:
Spectral 6.2.0:
To Reproduce
.spectral.yml
:spectral lint https://raw.githubusercontent.com/stoplightio/Public-APIs/master/reference/plaid/openapi.yaml
Expected behavior
An error that explains my ruleset is invalid, ideally pointing to what I did wrong and where.
or
Something like that.
Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: