JSONSchema::Validator::Draft7(3)

NAME
JSONSchema::Validator::Draft7 - Validator for JSON Schema Draft7

VERSION
version 0.011

SYNOPSIS
    $validator = JSONSchema::Validator::Draft7->new(schema => {...});
    my ($result, $errors) = $validator->validate_schema($object_to_validate);

DESCRIPTION
JSON Schema Draft7 validator with minimum dependencies.

CLASS METHODS

  new
Creates JSONSchema::Validator::Draft7 object.

    $validator = JSONSchema::Validator::Draft7->new(schema => {...});

Parameters

schema

Scheme according to which validation occurs.

strict

Use strong type checks. Default value is 1.

using_id_with_ref

Consider key $id to identify subschema when resolving links. For more details look at json schema docs about named anchors <https://json-schema.org/understanding-json-schema/structuring.html#id12> and bundling <https://json-schema.org/understanding-json-schema/structuring.html#id19>.

scheme_handlers

At the moment, the validator can load a resource using the http, https protocols. You can add other protocols yourself.

    sub loader {
        my $uri = shift;
        ...
    }
    $validator = JSONSchema::Validator::Draft7->new(schema => {...}, scheme_handlers => {ftp => \&loader});

METHODS

  validate_schema
Validate object instance according to schema.

AUTHORS

•   Alexey Stavrov <logioniz@ya.ru>

•   Ivan Putintsev <uid@rydlab.ru>

•   Anton Fedotov <tosha.fedotov.2000@gmail.com>

•   Denis Ibaev <dionys@gmail.com>

•   Andrey Khozov <andrey@rydlab.ru>

COPYRIGHT AND LICENSE
This software is Copyright (c) 2021 by Alexey Stavrov.

This is free software, licensed under:

  The MIT (X11) License