Hacker News new | ask | show | jobs
by predakanga 2064 days ago
Have you considered validating your YAML against a schema? JSON Schema[0] can do the trick, and has decent editor support[1].

It's not a panacea, but it can help avoid those long debugging sessions.

[0]: https://json-schema-everywhere.github.io/yaml

[1]: https://marketplace.visualstudio.com/items?itemName=redhat.v...

1 comments

Thanks for the suggestion. Last time I had to use YAML I used StrictYAML instead which gave me more peace of mind. I knew that there were schema tools around, however I just put more checks in the validator to avoid adding extra dependencies. Next time I will definitely look into those.