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
|
|
43
|
use strict; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
192
|
|
6
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
160
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
2792
|
use JSONSchema::Validator::Constraints::Draft7; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
198
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
39
|
use parent 'JSONSchema::Validator::Draft6'; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
26
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
371
|
use constant SPECIFICATION => 'Draft7'; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
399
|
|
13
|
6
|
|
|
6
|
|
47
|
use constant ID => 'http://json-schema.org/draft-07/schema#'; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
252
|
|
14
|
6
|
|
|
6
|
|
35
|
use constant ID_FIELD => '$id'; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
830
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
15
|
|
|
15
|
1
|
4027
|
my ($class, %params) = @_; |
18
|
|
|
|
|
|
|
|
19
|
15
|
|
|
|
|
87
|
my $self = $class->create(%params); |
20
|
|
|
|
|
|
|
|
21
|
15
|
|
50
|
|
|
156
|
my $constraints = JSONSchema::Validator::Constraints::Draft7->new(validator => $self, strict => $params{strict} // 1); |
22
|
15
|
|
|
|
|
33
|
$self->{constraints} = $constraints; |
23
|
|
|
|
|
|
|
|
24
|
15
|
|
|
|
|
65
|
return $self; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |