diff --git a/scripts/schema/cleaner.py b/scripts/schema/cleaner.py index f6c68f4337..46a9a89977 100644 --- a/scripts/schema/cleaner.py +++ b/scripts/schema/cleaner.py @@ -281,7 +281,7 @@ def check_example_value(field: Union[List, FieldEntry], strict: Optional[bool] = if isinstance(example_value, (list, dict)): field_name: str = field['field_details']['name'] - msg: str = f"Example value for field `{field_name}` contains an object or array which must be quoted to avoid YAML interpretation." + msg: str = f"Example value for field `{{field_name}}` contains an object or array which must be quoted to avoid YAML interpretation." strict_warning_handler(msg, strict) # Examples with arrays must be handled @@ -301,7 +301,7 @@ def check_example_value(field: Union[List, FieldEntry], strict: Optional[bool] = if expected_values: for example_value in example_values: if example_value not in expected_values: - msg = f"Example value `{example_value}` for field `{name}` is not one of the values defined in `expected_value`: {expected_values}." + msg = f"Example value `{example_value}` for field `{{name}}` is not one of the values defined in `expected_value`: {expected_values}." strict_warning_handler(msg, strict)