Commit 2f44bd95 authored by Willem ter Berg's avatar Willem ter Berg

uri validation

parent 0a041387
......@@ -155,7 +155,6 @@ def update_schema(schema):
is_uri = tk.get_validator('is_uri')
is_date = tk.get_validator('is_date')
is_list = tk.get_validator('is_list')
are_uris = tk.get_validator('are_uris')
to_list_if_curly_string = tk.get_converter('convert_to_list_if_curly_string')
to_curly_string_if_list = tk.get_converter('convert_to_curly_string_if_list')
spatial_validation = tk.get_validator('spatial_validation')
......@@ -195,8 +194,8 @@ def update_schema(schema):
'temporal_start': [recommended, is_date, to_extras],
'temporal_end': [recommended, is_date, to_extras],
'conforms_to': [recommended, to_list_if_curly_string, is_list, to_extras],
'related_resource': [recommended, to_list_if_curly_string, are_uris, to_extras],
'source': [recommended, to_list_if_curly_string, are_uris, to_extras],
'related_resource': [recommended, to_list_if_curly_string, is_uri, to_extras],
'source': [recommended, to_list_if_curly_string, is_uri, to_extras],
'issued': [recommended, is_date, to_extras],
'version': [recommended, is_string],
'version_notes': [recommended, to_list_if_curly_string, is_list, to_extras],
......@@ -205,10 +204,10 @@ def update_schema(schema):
'legal_foundation_ref': [recommended, is_string, to_extras],
'legal_foundation_uri': [recommended, is_uri, to_extras],
'legal_foundation_label': [recommended, is_string, to_extras],
'documentation': [optional, to_list_if_curly_string, are_uris, to_extras],
'documentation': [optional, to_list_if_curly_string, is_uri, to_extras],
'frequency': [optional, overheid_frequency, to_extras],
'provenance': [optional, to_list_if_curly_string, are_uris, to_extras],
'sample': [optional, to_list_if_curly_string, are_uris, to_extras],
'provenance': [optional, to_list_if_curly_string, is_uri, to_extras],
'sample': [optional, to_list_if_curly_string, is_uri, to_extras],
'dataset_status': [recommended, overheid_dataset_status, to_extras],
'date_planned': [optional, is_date, to_extras],
'__after': [spatial_validation,
......@@ -228,7 +227,7 @@ def update_schema(schema):
'license': [mandatory, overheid_license],
'format': [mandatory, mdr_filetype_nal],
'size': [recommended, is_number],
'download_url': [recommended, are_uris, to_curly_string_if_list],
'download_url': [recommended, is_uri, to_curly_string_if_list],
'mimetype': [recommended, iana_mediatypes],
'release_date': [recommended, is_date],
'rights': [recommended, is_string],
......@@ -237,7 +236,7 @@ def update_schema(schema):
'linked_schemas': [recommended, is_list, to_curly_string_if_list],
'hash': [optional, is_string],
'hash_algorithm': [optional, is_string],
'documentation': [optional, are_uris, to_curly_string_if_list],
'documentation': [optional, is_uri, to_curly_string_if_list],
'__after': [hash_validation]
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment