# VERSION
use File::Spec;
use Dancer2::Plugin;
use Module::Load;
use Carp;
use JSON ();
use JSON::Pointer;
use YAML::XS;
use Data::Walk;
our $ValidationCompiler; ## no critic (Variables:
}->location, $config->{schema});
if ($config->{schema} =~ /\.json/i) {
require Path::Tiny;
$schema = JSON::from_json(path($file)->slurp_utf8);
} elsif ($config->{schema} =~ /\.
{
(my $r = $_->{'$ref'}) =~ s/^#//;
my $rp = JSON::Pointer->get($schema, $r);
if ('HASH' eq ref $rp) {