Open de-jcup opened 5 years ago
Hmm... https://github.com/garethr/kubernetes-json-schema exists but no special one for yaml.
JSON seems to be readable by yaml parsers https://eli.thegreenplace.net/2008/11/22/json-yaml-but-yaml-json
So... kuberentes schemas availble as json shall be adaptable to yaml file respectively:
Link to json schema website: https://json-schema.org/
Further links : https://github.com/jimblackler/jsonschemafriend
I'd love, love to see something like this in Eclipse, particularly the autocomplete functionality based on a schema: https://developers.redhat.com/blog/2020/11/25/how-to-configure-yaml-schema-to-make-editing-files-easier
As far as I can tell no other Eclipse YAML editor offers this yet :)
Update: WWD (Wild Web Developer) supports YAML validation but it's a bit awkward to setup: https://github.com/eclipse/wildwebdeveloper/issues/705
Hmmm.... this looks very nice: https://github.com/java-json-tools/json-schema-validator is good supported, works with jackson and is also working with JSON an YAML.
Schemafiles should be very simple to assign:
a) context menu "Set Yaml/JSON Schema" b) main toolbar via a dedicated button/command
There shall a dialog appear with a) List of all wellknown schemas b) Show current selected schema (if selected) c) Have a "NONE" entry as well d) show all schemas available at ~/.de-jcup.schemas/ (or still ~/.yaml-editor/schemas/) e) provide selection f) provide an import of new schemas g) The possiblity to add h) have standard schemas "on board"
There shall be the possibility to use schema inside files.
Hmm.. automatic linking could be done by file filter patterns. e.g. application.yml -> spring schema... (maybe like ant matchers ?)
Documentation Links
https://blog.picnic.nl/how-to-use-yaml-schema-to-validate-your-yaml-files-c82c049c2097 https://json-schema-everywhere.github.io/yaml https://github.com/java-json-tools/json-schema-validator https://en.wikipedia.org/wiki/YAML