line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
31
|
|
|
31
|
|
19980
|
use strict; |
|
31
|
|
|
|
|
104
|
|
|
31
|
|
|
|
|
1098
|
|
2
|
31
|
|
|
31
|
|
196
|
use warnings; |
|
31
|
|
|
|
|
83
|
|
|
31
|
|
|
|
|
1880
|
|
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.572'; |
8
|
|
|
|
|
|
|
|
9
|
31
|
|
|
31
|
|
697
|
use 5.020; |
|
31
|
|
|
|
|
138
|
|
10
|
31
|
|
|
31
|
|
200
|
use Moo; |
|
31
|
|
|
|
|
81
|
|
|
31
|
|
|
|
|
237
|
|
11
|
31
|
|
|
31
|
|
13201
|
use strictures 2; |
|
31
|
|
|
|
|
345
|
|
|
31
|
|
|
|
|
1480
|
|
12
|
31
|
|
|
31
|
|
7704
|
use stable 0.031 'postderef'; |
|
31
|
|
|
|
|
607
|
|
|
31
|
|
|
|
|
289
|
|
13
|
31
|
|
|
31
|
|
5980
|
use experimental 'signatures'; |
|
31
|
|
|
|
|
103
|
|
|
31
|
|
|
|
|
210
|
|
14
|
31
|
|
|
31
|
|
2700
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
31
|
|
|
|
|
101
|
|
|
31
|
|
|
|
|
385
|
|
15
|
31
|
|
|
31
|
|
3150
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
31
|
|
|
|
|
93
|
|
|
31
|
|
|
|
|
278
|
|
16
|
31
|
|
|
31
|
|
1705
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
31
|
|
|
|
|
87
|
|
|
31
|
|
|
|
|
237
|
|
17
|
31
|
|
|
31
|
|
1657
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
31
|
|
|
|
|
102
|
|
|
31
|
|
|
|
|
242
|
|
18
|
31
|
|
|
31
|
|
1442
|
use JSON::Schema::Modern::Utilities qw(is_type E A assert_keyword_type); |
|
31
|
|
|
|
|
126
|
|
|
31
|
|
|
|
|
2687
|
|
19
|
31
|
|
|
31
|
|
244
|
use Feature::Compat::Try; |
|
31
|
|
|
|
|
104
|
|
|
31
|
|
|
|
|
386
|
|
20
|
31
|
|
|
31
|
|
5005
|
use namespace::clean; |
|
31
|
|
|
|
|
81
|
|
|
31
|
|
|
|
|
228
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub vocabulary { |
25
|
160
|
|
|
160
|
0
|
694
|
'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
|
880
|
qw(format); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1086
|
|
|
1086
|
|
1961
|
sub _traverse_keyword_format ($self, $schema, $state) { |
|
1086
|
|
|
|
|
1922
|
|
|
1086
|
|
|
|
|
1747
|
|
|
1086
|
|
|
|
|
1725
|
|
|
1086
|
|
|
|
|
1656
|
|
36
|
1086
|
50
|
|
|
|
3070
|
return if not assert_keyword_type($state, $schema, 'string'); |
37
|
1086
|
|
|
|
|
3339
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
857
|
|
|
857
|
|
1636
|
sub _eval_keyword_format ($self, $data, $schema, $state) { |
|
857
|
|
|
|
|
1606
|
|
|
857
|
|
|
|
|
1652
|
|
|
857
|
|
|
|
|
1535
|
|
|
857
|
|
|
|
|
1492
|
|
|
857
|
|
|
|
|
1377
|
|
41
|
857
|
|
|
|
|
3153
|
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.572 |
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 |