line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
31
|
|
|
31
|
|
20241
|
use strict; |
|
31
|
|
|
|
|
116
|
|
|
31
|
|
|
|
|
1211
|
|
2
|
31
|
|
|
31
|
|
258
|
use warnings; |
|
31
|
|
|
|
|
135
|
|
|
31
|
|
|
|
|
1891
|
|
3
|
|
|
|
|
|
|
package JSON::Schema::Modern::Vocabulary::FormatAnnotation; |
4
|
|
|
|
|
|
|
# vim: set ts=8 sts=2 sw=2 tw=100 et : |
5
|
|
|
|
|
|
|
# ABSTRACT: Implementation of the JSON Schema Format-Annotation vocabulary |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.571'; |
8
|
|
|
|
|
|
|
|
9
|
31
|
|
|
31
|
|
723
|
use 5.020; |
|
31
|
|
|
|
|
147
|
|
10
|
31
|
|
|
31
|
|
229
|
use Moo; |
|
31
|
|
|
|
|
137
|
|
|
31
|
|
|
|
|
284
|
|
11
|
31
|
|
|
31
|
|
14117
|
use strictures 2; |
|
31
|
|
|
|
|
392
|
|
|
31
|
|
|
|
|
1660
|
|
12
|
31
|
|
|
31
|
|
7713
|
use stable 0.031 'postderef'; |
|
31
|
|
|
|
|
656
|
|
|
31
|
|
|
|
|
324
|
|
13
|
31
|
|
|
31
|
|
6296
|
use experimental 'signatures'; |
|
31
|
|
|
|
|
149
|
|
|
31
|
|
|
|
|
265
|
|
14
|
31
|
|
|
31
|
|
3098
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
31
|
|
|
|
|
97
|
|
|
31
|
|
|
|
|
483
|
|
15
|
31
|
|
|
31
|
|
3367
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
31
|
|
|
|
|
103
|
|
|
31
|
|
|
|
|
354
|
|
16
|
31
|
|
|
31
|
|
1971
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
31
|
|
|
|
|
134
|
|
|
31
|
|
|
|
|
259
|
|
17
|
31
|
|
|
31
|
|
1850
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
31
|
|
|
|
|
150
|
|
|
31
|
|
|
|
|
293
|
|
18
|
31
|
|
|
31
|
|
1559
|
use JSON::Schema::Modern::Utilities qw(is_type E A assert_keyword_type); |
|
31
|
|
|
|
|
96
|
|
|
31
|
|
|
|
|
2732
|
|
19
|
31
|
|
|
31
|
|
302
|
use Feature::Compat::Try; |
|
31
|
|
|
|
|
109
|
|
|
31
|
|
|
|
|
462
|
|
20
|
31
|
|
|
31
|
|
5812
|
use namespace::clean; |
|
31
|
|
|
|
|
143
|
|
|
31
|
|
|
|
|
285
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub vocabulary { |
25
|
15
|
|
|
15
|
0
|
96
|
'https://json-schema.org/draft/2019-09/vocab/format' => 'draft2019-09', |
26
|
|
|
|
|
|
|
'https://json-schema.org/draft/2020-12/vocab/format-annotation' => 'draft2020-12'; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
0
|
0
|
sub evaluation_order { 2 } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub keywords { |
32
|
83
|
|
|
83
|
0
|
875
|
qw(format); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1086
|
|
|
1086
|
|
2061
|
sub _traverse_keyword_format ($self, $schema, $state) { |
|
1086
|
|
|
|
|
1994
|
|
|
1086
|
|
|
|
|
1735
|
|
|
1086
|
|
|
|
|
1682
|
|
|
1086
|
|
|
|
|
1674
|
|
36
|
1086
|
50
|
|
|
|
3373
|
return if not assert_keyword_type($state, $schema, 'string'); |
37
|
1086
|
|
|
|
|
3407
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
857
|
|
|
857
|
|
1689
|
sub _eval_keyword_format ($self, $data, $schema, $state) { |
|
857
|
|
|
|
|
1646
|
|
|
857
|
|
|
|
|
1641
|
|
|
857
|
|
|
|
|
1495
|
|
|
857
|
|
|
|
|
1500
|
|
|
857
|
|
|
|
|
1433
|
|
41
|
857
|
|
|
|
|
2891
|
return A($state, $schema->{format}); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding UTF-8 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
JSON::Schema::Modern::Vocabulary::FormatAnnotation - Implementation of the JSON Schema Format-Annotation vocabulary |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
version 0.571 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=for Pod::Coverage vocabulary evaluation_order keywords |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=for stopwords metaschema |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Implementation of the JSON Schema Draft 2020-12 "Format-Annotation" vocabulary, indicated in metaschemas |
67
|
|
|
|
|
|
|
with the URI C<https://json-schema.org/draft/2020-12/vocab/format-annotation> and formally specified in |
68
|
|
|
|
|
|
|
L<https://json-schema.org/draft/2020-12/json-schema-validation.html#section-7>. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Support is also provided for |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=over 4 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
the equivalent Draft 2019-09 keyword, indicated in metaschemas with the URI C<https://json-schema.org/draft/2019-09/vocab/format> and formally specified in L<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-02#section-7>. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
the equivalent Draft 7 keyword, as formally specified in L<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-7>. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 SEE ALSO |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=over 4 |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L<JSON::Schema::Modern/Format Validation> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=for stopwords OpenAPI |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 SUPPORT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/karenetheridge/JSON-Schema-Modern/issues>. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
I am also usually active on irc, as 'ether' at C<irc.perl.org> and C<irc.libera.chat>. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
You can also find me on the L<JSON Schema Slack server|https://json-schema.slack.com> and L<OpenAPI Slack |
103
|
|
|
|
|
|
|
server|https://open-api.slack.com>, which are also great resources for finding help. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Karen Etheridge. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
114
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |