paazmaya / yaml-validator

Validate Yaml files and enforce a given structure
MIT License
56 stars 17 forks source link

Optional fields with null values should be counted as valid #11

Open xrodo912 opened 7 years ago

xrodo912 commented 7 years ago

Expected behaviour

Optional fields with a null value should be counted as valid if the structure matches.

Actual behaviour

Optional fields with a null value are counted as invalid.

Verify a yaml with this field/value: middle name: null Against this structure: 'middle name?': 'string'.

Versions and environment

Thank you and have some :grapes:.

paazmaya commented 7 years ago

Thank you for the issue, by following the template.

I will try to create a test case for this first...

paazmaya commented 7 years ago

@xrodo912 In case you have already some example files that could be used for testing, mind creating a PR?