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
Consider the two attached OpenAPI docs. One is a yaml document with anchors and the other is the same document that I have just inlined the anchors by doing a roundtrip through https://github.com/go-yaml/yaml
The below reproducible code shows that the document with anchors returns incorrect yaml nodes when present (specifically I am getting a node with no content).
rules:
test-rule:
description: Important field must be defined on all levels
message: "important-field must be defined"
severity: error
given: $.x-b
then:
field: important-field
function: defined
Spectral works as expected
$ spectral lint config.yaml --ruleset ruleset.yaml
No results with a severity of 'error' found!
Vacuum does not:
$ vacuum -r ruleset.yaml lint config.yaml -d
Location | Severity | Message | Rule | Category | Path
config.yaml:7:3 | error | important-field must be defined | test-rule | Validation | $.x-b
Linting file 'config.yaml' failed with 1 errors, 0 warnings and 0 informs
Consider the two attached OpenAPI docs. One is a yaml document with anchors and the other is the same document that I have just inlined the anchors by doing a roundtrip through https://github.com/go-yaml/yaml
The below reproducible code shows that the document with anchors returns incorrect yaml nodes when present (specifically I am getting a node with no content).
The code returns
errors found
in the version with anchors and just returnsdone
in the inlined versionopenapi.zip
The text was updated successfully, but these errors were encountered: