-
Notifications
You must be signed in to change notification settings - Fork 25
Description
For support questions, please use the Stoplight Community Forum. This repository's issues are reserved for feature requests and bug reports. If you are unsure if you are experiencing a bug, the Community Forum is a great place to start.
Please delete this section, any any sections below that you don't use, before creating the issue.
Describe the bug
When adding documentationUrl to the custom spectral ruleset file, the extension breaks with error, although documentationUrl is a valid supported configuration according to https://docs.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets#documentation-url
To Reproduce
Enable the extension with the following .spectral.yaml:
extends:
- "spectral:oas"
rules:
# ---------------------------------------------------------------------------
# @description: verify x-visibility is available for every operation
# @link: https://go/apis-security-lint/x-visibility
# ---------------------------------------------------------------------------
x-visibility-truthy:
documentationUrl: https://go/apis-security-lint/x-visibility
description: x-visibility check
message: "Make sure x-visibility is available for every operation"
severity: "error"
given: "$.paths.*.*"
then:
field: x-visibility
function: truthyYou should see the error in the Spectral OUTPUT log.
Now remove the documentationUrl and the error is gone.
Expected behavior
When documentationUrl is set in a rule, the extension should not break, and when hovering over a warning or an error with a documentationUrl link, it should provide a clickable link to the URL defined in the .spectral.yaml file.
Screenshots
.spectral.yaml with documentationUrl (note that the openapi.json is not red - this is cause the extension broke):
Same .spectral.yaml without it (note that the extension output is fine, and the openapi.json file is red):
Environment:
- Extension version: 1.1.2
- VS Code version: Visual Studio Code 1.88.1
- Operating System: MacOS Sonoma 14.4.1 (23E224)
Additional context
Add any other context about the problem here.

