prefect.utilities.validation
¶
validate_schema
¶
Validate that the provided schema is a valid json schema.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
schema |
dict
|
The schema to validate. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the provided schema is not a valid json schema. |
Source code in prefect/utilities/validation.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
validate_values_conform_to_schema
¶
Validate that the provided values conform to the provided json schema.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
values |
dict
|
The values to validate. |
required |
schema |
dict
|
The schema to validate against. |
required |
ignore_required |
bool
|
Whether to ignore the required fields in the schema. Should be used when a partial set of values is acceptable. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If the parameters do not conform to the schema. |
Source code in prefect/utilities/validation.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|