ecsjobs.schema module

class ecsjobs.schema.Schema[source]

Bases: object

base_schema = {'$schema': 'http://json-schema.org/schema#', 'additionalProperties': False, 'definitions': {}, 'description': 'Overall ecsjobs (Python package) configuration', 'id': 'http://schemas.jasonantman.com/github/ecsjobs/config.json', 'properties': {'global': {'additionalItems': False, 'properties': {'email_subject': {'type': 'string'}, 'failure_command': {'type': 'array'}, 'failure_html_path': {'type': 'string'}, 'from_email': {'format': 'email', 'type': 'string'}, 'inter_poll_sleep_sec': {'type': 'integer'}, 'max_total_runtime_sec': {'type': 'integer'}, 'to_email': {'oneOf': [{'type': 'array', 'items': {'type': 'string', 'format': 'email'}}, {'type': 'string', 'format': 'email'}]}}, 'required': ['from_email', 'to_email'], 'title': 'Global configuration for application', 'type': 'object'}, 'jobs': {'additionalItems': False, 'description': 'Array of items that construct Job subclass instances', 'items': {'anyOf': []}, 'title': 'Array of Jobs to run', 'type': 'array'}}, 'required': ['global', 'jobs'], 'title': 'ECSJobs configuration schema', 'type': 'object'}
schema_dict

Return the full generated schema dict.

Returns:generated JSONSchema
Return type:dict
validate(config_dict)[source]

Validate the specified configuration dict against the schema.

Parameters:config_dict (dict) – configuration to validate