Add syntax highlighting and validation to Yaml Authoring#13357
Add syntax highlighting and validation to Yaml Authoring#13357KyleMit wants to merge 1 commit intoelastic:masterfrom KyleMit:master
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
|
FYI - Redhat recently updated their yaml extension to take advantage of conditional subschemas #222, so it should offer a really powerful way to compose yaml and provide insightful autocompletion for all elastic beats config properties |
|
Pinging @elastic/uptime (:uptime) |
|
Super cool idea, we could possibly use it for validating configs as well (@urso thoughts?). I'd like this to be part of a comprehensive schema validation definition so it doesn't get out of sync with the app however. I think we need this since today if you add a yaml key that doesn't exist there's no error. |
|
Hi! We're labeling this issue as |
|
👍 |
|
Hi! We're labeling this issue as |
|
Hi! |
This PR is probably in a pretty immature state and should probably get pulled into a feature branch and iterated on,, but just as a vehicle for sharing the code & idea.
It would be awesome to get some syntax highlighting, inline documentation, and immediate validation help by creating and maintaining a schema definition file for any yaml config files.
The most well supported way to do this seems to be using a json schema definition file and integrating with the YAML - Red Hat extension. This may perhaps be a subset of users, but would help a non trivial number of people to provide a standardized approach to updating configs with confidence.
Here's the authoring experience after a schema has been applied:
This schema should be a pretty good start on the yaml config for monitors, but there are some other options and other configs to document as well.