line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSONSchema::Validator::Draft7; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Validator for JSON Schema Draft7 |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
47
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
153
|
|
6
|
6
|
|
|
6
|
|
26
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
135
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
2232
|
use JSONSchema::Validator::Constraints::Draft7; |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
162
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
33
|
use parent 'JSONSchema::Validator::Draft6'; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
22
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
297
|
use constant SPECIFICATION => 'Draft7'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
316
|
|
13
|
6
|
|
|
6
|
|
30
|
use constant ID => 'http://json-schema.org/draft-07/schema#'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
203
|
|
14
|
6
|
|
|
6
|
|
28
|
use constant ID_FIELD => '$id'; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
621
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
15
|
|
|
15
|
1
|
3742
|
my ($class, %params) = @_; |
18
|
|
|
|
|
|
|
|
19
|
15
|
|
|
|
|
101
|
my $self = $class->create(%params); |
20
|
|
|
|
|
|
|
|
21
|
15
|
|
50
|
|
|
150
|
my $constraints = JSONSchema::Validator::Constraints::Draft7->new(validator => $self, strict => $params{strict} // 1); |
22
|
15
|
|
|
|
|
36
|
$self->{constraints} = $constraints; |
23
|
|
|
|
|
|
|
|
24
|
15
|
|
|
|
|
49
|
return $self; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |