aiida_crystal17.validation package¶
Module contents¶
-
aiida_crystal17.validation.
load_schema
(path)[source]¶ read and return a json schema
if the path is absolute, it will be used as is, otherwise it will be joined with the path to the internal json schema folder
-
aiida_crystal17.validation.
load_validator
(schema)[source]¶ create a validator for a schema
- Parameters
- Returns
the validator to use
- Return type
-
aiida_crystal17.validation.
validate_against_schema
(data, schema)[source]¶ validate json-type data against a schema
- Parameters
- Raises
jsonschema.exceptions.SchemaError – if the schema is invalid
jsonschema.exceptions.ValidationError – if the instance is invalid
- Returns
return True if validated
- Return type