Allow integer value for ports
While it was intended as a positive to be stricter in validation it would in fact break backwards compatibility, which we do not want to be doing. Consider re-visiting this later and include a deprecation warning if we want to be stricter. Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit is contained in:
parent
df74b131ff
commit
b4872de213
3 changed files with 27 additions and 7 deletions
|
|
@ -84,6 +84,13 @@ def process_errors(errors):
|
|||
required.append("Service '{}' has neither an image nor a build path specified. Exactly one must be provided.".format(service_name))
|
||||
else:
|
||||
required.append(error.message)
|
||||
elif error.validator == 'oneOf':
|
||||
config_key = error.path[1]
|
||||
valid_types = [context.validator_value for context in error.context]
|
||||
valid_type_msg = " or ".join(valid_types)
|
||||
type_errors.append("Service '{}' configuration key '{}' contains an invalid type, it should be either {}".format(
|
||||
service_name, config_key, valid_type_msg)
|
||||
)
|
||||
elif error.validator == 'type':
|
||||
msg = "a"
|
||||
if error.validator_value == "array":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue