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
|
|
41
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
171
|
|
6
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
150
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
2456
|
use JSONSchema::Validator::Constraints::Draft7; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
187
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
35
|
use parent 'JSONSchema::Validator::Draft6'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
24
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
322
|
use constant SPECIFICATION => 'Draft7'; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
310
|
|
13
|
6
|
|
|
6
|
|
33
|
use constant ID => 'http://json-schema.org/draft-07/schema#'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
228
|
|
14
|
6
|
|
|
6
|
|
29
|
use constant ID_FIELD => '$id'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
705
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
15
|
|
|
15
|
1
|
3769
|
my ($class, %params) = @_; |
18
|
|
|
|
|
|
|
|
19
|
15
|
|
|
|
|
107
|
my $self = $class->create(%params); |
20
|
|
|
|
|
|
|
|
21
|
15
|
|
50
|
|
|
151
|
my $constraints = JSONSchema::Validator::Constraints::Draft7->new(validator => $self, strict => $params{strict} // 1); |
22
|
15
|
|
|
|
|
33
|
$self->{constraints} = $constraints; |
23
|
|
|
|
|
|
|
|
24
|
15
|
|
|
|
|
52
|
return $self; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |