buildtest.schemas.defaults
Module Contents
Functions
|
This is a custom validator for validating JSON documents. We implement a |
Attributes
- buildtest.schemas.defaults.here
- buildtest.schemas.defaults.schema_table
- buildtest.schemas.defaults.schema_store
- buildtest.schemas.defaults.resolver
- buildtest.schemas.defaults.custom_validator(recipe, schema)[source]
This is a custom validator for validating JSON documents. We implement a custom resolver using RefResolver to find schemas locally in order to validate buildspecs with schema files on local filesystem. This ensures changes to schema can be done in sync with change to code base.
This method uses Draft7Validator for validating schemas. If there is an error during validation jsonschema will raise an exception of type jsonschema.exceptions.ValidationError