23andMe / Yamale

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

resolves #54: empty data should failed if schema requires something #81

Closed abourree closed 4 years ago

abourree commented 4 years ago

resolves #54 by replacing [] in make_data by [(None, path)]

mildebrandt commented 4 years ago

Thanks for your PR! I'll take a look.

mildebrandt commented 4 years ago

Sorry, I had the wrong branch. I see your validation error is the following:

Error validating data /Users/chrism/workspace/abourree/Yamale/54.yaml with schema schema.yaml
         : 'None' is not a map

I would expect this instead:

Error validating data /Users/chrism/workspace/abourree/Yamale/54.yaml with schema schema.yaml
        log_file: Required field missing
abourree commented 4 years ago

Better than "log_file: Required field missing" => list all missing filed

abourree commented 4 years ago

Should be ready to merge

mildebrandt commented 4 years ago

Awesome, thanks!