Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make validation errors representation more conventional and informative #44

Open
candleindark opened this issue Dec 13, 2024 · 0 comments
Assignees

Comments

@candleindark
Copy link
Member

Per @yarikoptic's suggestion. The json output generated for different type of validator errors are unconventional such as having a name of pydantic_validation_errs. We should change the generated JSON to represent the error as something like:

{
"validator": {"type": "Pydantic", "version": "2.10.1"},
"errors": [...]
}

The code that will needed to be changed includes

# Error encountered in validation against the Pydantic dandiset metadata model
pydantic_validation_errs: Annotated[
Json[PydanticValidationErrsType], Field(default_factory=list)
]
# Errors encountered in validation against the dandiset metadata model in LinkML
linkml_validation_errs: Annotated[
LinkmlValidationErrsType, Field(default_factory=list)
]
.

@candleindark candleindark self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant