Skip to content

Commit

Permalink
Rename & document (Remote)ValidationError
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Feb 8, 2023
1 parent 9a36d21 commit f1d752b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions dandi/dandiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,15 @@ def __str__(self) -> str:
return self.identifier


class ValidationError(APIBase):
class RemoteValidationError(APIBase):
"""
.. versionadded:: 0.49.0
Validation error record obtained from a server. Not to be confused with
:class:`dandi.validate_types.ValidationResult`, which provides richer
representation of validation errors.
"""

field: str
message: str

Expand All @@ -663,8 +671,8 @@ class VersionInfo(Version):
errors
"""

asset_validation_errors: List[ValidationError]
version_validation_errors: List[ValidationError]
asset_validation_errors: List[RemoteValidationError]
version_validation_errors: List[RemoteValidationError]


class RemoteDandisetData(APIBase):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/modref/dandiapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Dandisets
.. autoclass:: VersionInfo()
:show-inheritance:

.. autoclass:: ValidationError()
.. autoclass:: RemoteValidationError()
:inherited-members: BaseModel

Assets
Expand Down

0 comments on commit f1d752b

Please sign in to comment.