-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Description
Describe the bug
I'm actually not sure if it's a schema issue but it looks fine. If I'm mistaken, sorry!
It seems the language server doesn't properly support string enum arrays.
I'm using the following schema: https://raw.githubusercontent.com/aquasecurity/trivy/main/schema/trivy-config.json
This fragment is relevant:
"severity": {
"items": {
"type": "string"
},
"type": "array",
"enum": [
"UNKNOWN",
"LOW",
"MEDIUM",
"HIGH",
"CRITICAL"
],
"description": "severities of security issues to be displayed"
},When I use the following fragment in my yaml:
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquasecurity/trivy/main/schema/trivy-config.json
severity:
- MEDIUMExpected Behavior
No errors happen, since MEDIUM is value in the enum.
Current Behavior
I see the following error: Value is not accepted. Valid values: "UNKNOWN", "LOW", "MEDIUM", "HIGH", "CRITICAL".
Quoting "MEDIUM" or using alternative YAML array syntaxes doesn't work either.
Steps to Reproduce
- Paste my example YAML into a new file.
- Observe the issue.
Environment
- Windows
- Mac
- Linux
- other (please specify)
Extension version: 1.19.1
Thanks for your work, this extension is invaluable 🙇
Metadata
Metadata
Assignees
Labels
No labels