Issue

Issue(jsonpath: str, type: str, message: str, instance: Any = None)

An issue found while checking a Data Package’s properties.

One Issue object represents one failed check on one field within the properties.

Attributes

jsonpath : string

A JSON path format pointing to the field in the input object where the issue is located. For example, $.resources[2].name.

type : string

The type of the check that failed (e.g., a JSON schema type such as “required”, “type”, “pattern”, or “format”, or a custom type). Used to exclude specific types of issues.

message : string

A description of what exactly the issue is.

instance : Any

The part of the object that failed the check. This field is not considered when comparing or hashing Issue objects.

Examples

import check_datapackage as cdp

issue = cdp.Issue(
    jsonpath="$.resources[2].title",
    type="required",
    message="The `title` field is required but missing at the given JSON path.",
)