import check_datapackage as cdp
required_title_check = cdp.RequiredCheck(
jsonpath="$.title",
message="A title is required.",
)RequiredCheck
RequiredCheck(jsonpath: str, message: str)Set a specific property as required.
Attributes
jsonpath : str-
The location of the field or fields, expressed in JSON path notation, to which the check applies (e.g.,
$.resources[*].name). message : str-
The message that is shown when the check fails.
Examples
Methods
| Name | Description |
|---|---|
| apply | Applies the required check to the properties. |
apply
RequiredCheck.apply(properties: dict[str, Any])Applies the required check to the properties.
Parameters
properties : dict[str, Any]-
The properties to check.
Returns
list[Issue]-
A list of
Issues.