line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
31
|
|
|
31
|
|
19378
|
use strict; |
|
31
|
|
|
|
|
107
|
|
|
31
|
|
|
|
|
1206
|
|
2
|
31
|
|
|
31
|
|
244
|
use warnings; |
|
31
|
|
|
|
|
111
|
|
|
31
|
|
|
|
|
1899
|
|
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.570'; |
8
|
|
|
|
|
|
|
|
9
|
31
|
|
|
31
|
|
660
|
use 5.020; |
|
31
|
|
|
|
|
139
|
|
10
|
31
|
|
|
31
|
|
215
|
use Moo; |
|
31
|
|
|
|
|
96
|
|
|
31
|
|
|
|
|
298
|
|
11
|
31
|
|
|
31
|
|
13573
|
use strictures 2; |
|
31
|
|
|
|
|
365
|
|
|
31
|
|
|
|
|
1561
|
|
12
|
31
|
|
|
31
|
|
7907
|
use stable 0.031 'postderef'; |
|
31
|
|
|
|
|
664
|
|
|
31
|
|
|
|
|
321
|
|
13
|
31
|
|
|
31
|
|
6548
|
use experimental 'signatures'; |
|
31
|
|
|
|
|
128
|
|
|
31
|
|
|
|
|
263
|
|
14
|
31
|
|
|
31
|
|
2940
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
31
|
|
|
|
|
101
|
|
|
31
|
|
|
|
|
420
|
|
15
|
31
|
|
|
31
|
|
3360
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
31
|
|
|
|
|
120
|
|
|
31
|
|
|
|
|
315
|
|
16
|
31
|
|
|
31
|
|
1768
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
31
|
|
|
|
|
149
|
|
|
31
|
|
|
|
|
236
|
|
17
|
31
|
|
|
31
|
|
1674
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
31
|
|
|
|
|
124
|
|
|
31
|
|
|
|
|
283
|
|
18
|
31
|
|
|
31
|
|
1588
|
use JSON::Schema::Modern::Utilities qw(is_type E A assert_keyword_type); |
|
31
|
|
|
|
|
95
|
|
|
31
|
|
|
|
|
2632
|
|
19
|
31
|
|
|
31
|
|
287
|
use Feature::Compat::Try; |
|
31
|
|
|
|
|
114
|
|
|
31
|
|
|
|
|
481
|
|
20
|
31
|
|
|
31
|
|
5228
|
use namespace::clean; |
|
31
|
|
|
|
|
128
|
|
|
31
|
|
|
|
|
250
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub vocabulary { |
25
|
15
|
|
|
15
|
0
|
86
|
'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
|
86
|
|
|
86
|
0
|
1021
|
qw(format); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1064
|
|
|
1064
|
|
1937
|
sub _traverse_keyword_format ($self, $schema, $state) { |
|
1064
|
|
|
|
|
1946
|
|
|
1064
|
|
|
|
|
1709
|
|
|
1064
|
|
|
|
|
1739
|
|
|
1064
|
|
|
|
|
1620
|
|
36
|
1064
|
50
|
|
|
|
3198
|
return if not assert_keyword_type($state, $schema, 'string'); |
37
|
1064
|
|
|
|
|
3420
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
819
|
|
|
819
|
|
1545
|
sub _eval_keyword_format ($self, $data, $schema, $state) { |
|
819
|
|
|
|
|
1656
|
|
|
819
|
|
|
|
|
1568
|
|
|
819
|
|
|
|
|
1394
|
|
|
819
|
|
|
|
|
1352
|
|
|
819
|
|
|
|
|
1332
|
|
41
|
819
|
|
|
|
|
3127
|
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.570 |
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 |