Fix validation message when there are multiple ested oneOf validations.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
1f2c2942d7
commit
02535f0cf1
2 changed files with 25 additions and 0 deletions
|
|
@ -312,6 +312,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