yaml-language-server
yaml-language-server copied to clipboard
Add option to specify schema validation severity level
Is your enhancement related to a problem? Please describe.
I am using monaco-editor and monaco-yaml. I need to configure the editor such that user input YAML is validated against a schema, with validation failures reported as errors to the user (as opposed to warnings).
Describe the solution you would like
The built-in JSON support of monaco-editor provides a configurable severity for schema validation failures (see here). I would suggest similar functionality for yaml-language-server. If this option is added, the monaco-yaml maintainer has expressed support for passing the option through: remcohaszing/monaco-yaml#149
Describe alternatives you have considered
@remcohaszing and I also discussed adding a hook into monaco-yaml to allow post-processing of warnings/errors, but this approach is more consistent with monaco-editor's built-in JSON support.
I do not see a problem with adding this option—definitely a better choice than post-processing. The fastest way to implement this would be to provide a PR on it. Let me know if you would like to take a shot at providing one.
I will try to get a PR together, hopefully next week.
Any update on this? :)