buildtest.schemas.utils
¶
Utility and helper functions for schemas.
Module Contents¶
Functions¶
|
Load a json schema file, the file extension must be .schema.json |
|
Load a yaml recipe file. The file must be in .yml extension for buildtest to load. |
Attributes¶
- buildtest.schemas.utils.here¶
- buildtest.schemas.utils.load_schema(path)[source]¶
Load a json schema file, the file extension must be .schema.json
- Parameters
path (str) – Path to schema file
- Returns
Return loaded schema as JSON document
- Return type
- Raises
SystemExit – If filepath doesn’t exist or schema file doesn’t ends in .schema.json
- buildtest.schemas.utils.load_recipe(path)[source]¶
Load a yaml recipe file. The file must be in .yml extension for buildtest to load.
- Parameters
path (str) – The full path to buildspec recipe
- Returns
a dict containing buildspec that is defined in YAML format
- Return type
- Raises
SystemExit – If filepath doesn’t exist or doesn’t end in .yml extension