blueetl.validation

Validation utilities.

Functions

read_schema(schema_name)

Load a schema and return the result as a dictionary.

validate_config(config, schema)

Raise an exception if the configuration is not valid.

Exceptions

ValidationError

Validation error.

exception blueetl.validation.ValidationError

Bases: Exception

Validation error.

blueetl.validation.read_schema(schema_name: str) dict

Load a schema and return the result as a dictionary.

blueetl.validation.validate_config(config: dict, schema: dict) None

Raise an exception if the configuration is not valid.

Parameters:
  • config – configuration to be validated.

  • schema – json schema.

Raises:

ValidationError if the validation failed.