23andMe / Yamale

A schema and validator for YAML.
MIT License
679 stars 88 forks source link

Generate warning in addition to errors #170

Closed erdalkaraca closed 3 years ago

erdalkaraca commented 3 years ago

It seems the ValidationResult type only reports errors. I would need to also generate warnings based on additional criteria provided to the validators, for example:

Book:
  title: str()
  pages: int(required=False, recommended=True)

Here, Books.pages is not required but recommended and I would like to create a warning or maybe another level of validation severity. Is that possible given the current codebase of Yamale or would this require much effort to implement?

mildebrandt commented 3 years ago

Hi @erdalkaraca , thanks for your interest in Yamale!

Sorry, this isn't a direction we'd like to take in Yamale. We'd like to keep it as a strict validation tool. You're more than welcome to fork this repo and add your own functionality.

erdalkaraca commented 3 years ago

Well, implementing that functionality in a separate fork will most probably lead to non-mergeable code in future.

Anyways, thanks for the fast reply.