From 37eaf18d033ab6162912571f512b2f4b7c426636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20H=C3=BCbner?= Date: Fri, 7 Feb 2025 18:42:50 +0100 Subject: [PATCH] Remove link annotation from the error message string This removes the annotation [link] and [/link] from the code that is supposed to clean the JSON schema error messages. However, while these annotations might improve the readability of the URL to the JSON schema, they are wrongly displayed on GitHub when running amdirt validate as part of the GitHub workflow. --- amdirt/validate/domain/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amdirt/validate/domain/__init__.py b/amdirt/validate/domain/__init__.py index 0c53304..e8e4097 100644 --- a/amdirt/validate/domain/__init__.py +++ b/amdirt/validate/domain/__init__.py @@ -250,7 +250,7 @@ def cleanup_errors(self, error: json_exceptions.ValidationError) -> DFError: err_column = list(error.path)[-1] if "enum" in error.schema: if len(error.schema["enum"]) > 3: - error.message = f"'{error.instance}' is not an accepted value.\nPlease check [link={self.schema['items']['properties'][err_column]['$ref']}]{self.schema['items']['properties'][err_column]['$ref']}[/link]" + error.message = f"'{error.instance}' is not an accepted value.\nPlease check {self.schema['items']['properties'][err_column]['$ref']}" err_line = str(error.path[0]) return DFError( "Schema Validation Error",