validate_file_using_schema#
Summary#
Validate a file using a schema. Input files can be metadata, schema, or data files in yaml, json, or ecsv format.
Command line arguments#
- file_name (str)
input file to be validated
- schema (str)
schema file (jsonschema format) used for validation
- data_type (str)
type of input data (allowed types: metadata, schema, data)
Raises#
- FileNotFoundError
if file to be validated is not found
Example#
simtools-validate-file-using-schema \
--file_name tests/resources/MLTdata-preproduction.meta.yml \
--schema simtools/schemas/metadata.metaschema.yml \
--data_type metadata