diff --git a/reana_client/validation/utils.py b/reana_client/validation/utils.py index 3d9e2ea1..4d7b0f84 100644 --- a/reana_client/validation/utils.py +++ b/reana_client/validation/utils.py @@ -58,15 +58,24 @@ def validate_reana_spec( msg_type="warning", indented=True, ) - for warning_key, warning_value in validation_warnings.items(): + for warning_key, warning_values in validation_warnings.items(): if warning_key == "additional_properties": # warning_values is a list of unexpected properties + messages = [ + f"'{value['property']}' (at {value['path']})" + for value in warning_values + ] message = ( f"Unexpected properties found in REANA specification file: " - f"{', '.join(warning_value)}" + f"{', '.join(messages)}." ) else: - message = warning_value + # warning_values is a list of dictionaries with 'message' and 'path' + messages = [ + f"{value['message']} (at {value['path']})" + for value in warning_values + ] + message = f"{'; '.join(messages)}." display_message( message, msg_type="warning",