Skip to content

Commit

Permalink
Merge pull request #169 from SPAAM-community/json_schema_error_messag…
Browse files Browse the repository at this point in the history
…e_link_parsing

Remove link annotation from the error message string
  • Loading branch information
alexhbnr authored Feb 9, 2025
2 parents 6694a9d + 12d938a commit 105c8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amdirt/validate/domain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 105c8e5

Please sign in to comment.