def validate(instance):
    """ Validates a given ``instance``.

    :param object instance: The instance to validate
    :raises jsonschema.exceptions.ValidationError: On failed validation
    """

    jsonschema.validate(
        to_dict(instance, dict_type=dict), build_schema(instance.__class__)
    )
def validate ( instance ) : jsonschema . validate ( to_dict ( instance , dict_type = dict ) , build_schema ( instance . __class__ ) )
Validates a given ``instance``.

    :param object instance: The instance to validate
    :raises jsonschema.exceptions.ValidationError: On failed validation