Merge pull request #2975 from dnephin/fix_crash_on_none_in_config
Fix validation message when there are multiple nested oneOf validations.
This commit is contained in:
commit
d5514965d5
2 changed files with 25 additions and 0 deletions
|
|
@ -332,6 +332,10 @@ def _parse_oneof_validator(error):
|
|||
types = []
|
||||
for context in error.context:
|
||||
|
||||
if context.validator == 'oneOf':
|
||||
_, error_msg = _parse_oneof_validator(context)
|
||||
return path_string(context.path), error_msg
|
||||
|
||||
if context.validator == 'required':
|
||||
return (None, context.message)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue