Skip to content

Commit

Permalink
Update chapman validator to use verify_type instead of compare_type
Browse files Browse the repository at this point in the history
  • Loading branch information
amywieliczka committed Dec 20, 2023
1 parent 36d2a32 commit e31a64a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions metadata_mapper/mappers/oai/chapman_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,26 @@ def map_identifier(self) -> Union[str, None]:
class ChapmanValidator(Validator):
def setup(self, **options):
self.add_validatable_field(
field="identifier", type=Validator.list_of(str),
field="identifier",
validations=[
ChapmanValidator.list_match_ignore_url_protocol,
Validator.type_match,
Validator.verify_type(Validator.list_of(str))
]
)
self.add_validatable_field(
field="is_shown_at", type=str,
field="is_shown_at",
validations=[
Validator.required_field,
ChapmanValidator.str_match_ignore_url_protocol,
Validator.type_match,
Validator.verify_type(str),
]
)
self.add_validatable_field(
field="is_shown_by", type=str,
field="is_shown_by",
validations=[
Validator.required_field,
ChapmanValidator.str_match_ignore_url_protocol,
Validator.type_match,
Validator.verify_type(str),
]
)

Expand Down

0 comments on commit e31a64a

Please sign in to comment.