line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
31
|
|
|
31
|
|
16307
|
use strict; |
|
31
|
|
|
|
|
86
|
|
|
31
|
|
|
|
|
1076
|
|
2
|
31
|
|
|
31
|
|
180
|
use warnings; |
|
31
|
|
|
|
|
96
|
|
|
31
|
|
|
|
|
1686
|
|
3
|
|
|
|
|
|
|
package JSON::Schema::Modern::Vocabulary::MetaData; |
4
|
|
|
|
|
|
|
# vim: set ts=8 sts=2 sw=2 tw=100 et : |
5
|
|
|
|
|
|
|
# ABSTRACT: Implementation of the JSON Schema Meta-Data vocabulary |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.572'; |
8
|
|
|
|
|
|
|
|
9
|
31
|
|
|
31
|
|
548
|
use 5.020; |
|
31
|
|
|
|
|
125
|
|
10
|
31
|
|
|
31
|
|
181
|
use Moo; |
|
31
|
|
|
|
|
119
|
|
|
31
|
|
|
|
|
198
|
|
11
|
31
|
|
|
31
|
|
13101
|
use strictures 2; |
|
31
|
|
|
|
|
233
|
|
|
31
|
|
|
|
|
1169
|
|
12
|
31
|
|
|
31
|
|
5868
|
use stable 0.031 'postderef'; |
|
31
|
|
|
|
|
525
|
|
|
31
|
|
|
|
|
210
|
|
13
|
31
|
|
|
31
|
|
4511
|
use experimental 'signatures'; |
|
31
|
|
|
|
|
97
|
|
|
31
|
|
|
|
|
160
|
|
14
|
31
|
|
|
31
|
|
2635
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
31
|
|
|
|
|
101
|
|
|
31
|
|
|
|
|
327
|
|
15
|
31
|
|
|
31
|
|
2971
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
31
|
|
|
|
|
98
|
|
|
31
|
|
|
|
|
306
|
|
16
|
31
|
|
|
31
|
|
1660
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
31
|
|
|
|
|
121
|
|
|
31
|
|
|
|
|
243
|
|
17
|
31
|
|
|
31
|
|
1676
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
31
|
|
|
|
|
90
|
|
|
31
|
|
|
|
|
222
|
|
18
|
31
|
|
|
31
|
|
1340
|
use JSON::Schema::Modern::Utilities qw(assert_keyword_type annotate_self); |
|
31
|
|
|
|
|
87
|
|
|
31
|
|
|
|
|
2037
|
|
19
|
31
|
|
|
31
|
|
224
|
use namespace::clean; |
|
31
|
|
|
|
|
80
|
|
|
31
|
|
|
|
|
253
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub vocabulary { |
24
|
160
|
|
|
160
|
0
|
656
|
'https://json-schema.org/draft/2019-09/vocab/meta-data' => 'draft2019-09', |
25
|
|
|
|
|
|
|
'https://json-schema.org/draft/2020-12/vocab/meta-data' => 'draft2020-12'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
0
|
0
|
sub evaluation_order { 5 } |
29
|
|
|
|
|
|
|
|
30
|
92
|
|
|
92
|
0
|
205
|
sub keywords ($self, $spec_version) { |
|
92
|
|
|
|
|
200
|
|
|
92
|
|
|
|
|
191
|
|
|
92
|
|
|
|
|
162
|
|
31
|
|
|
|
|
|
|
return ( |
32
|
92
|
100
|
|
|
|
2669
|
qw(title description default), |
33
|
|
|
|
|
|
|
$spec_version ne 'draft7' ? 'deprecated' : (), |
34
|
|
|
|
|
|
|
qw(readOnly writeOnly examples), |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
184
|
|
|
184
|
|
355
|
sub _traverse_keyword_title ($self, $schema, $state) { |
|
184
|
|
|
|
|
394
|
|
|
184
|
|
|
|
|
314
|
|
|
184
|
|
|
|
|
324
|
|
|
184
|
|
|
|
|
324
|
|
39
|
184
|
50
|
|
|
|
575
|
return if not assert_keyword_type($state, $schema, 'string'); |
40
|
184
|
|
|
|
|
611
|
return 1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
1590
|
|
|
1590
|
|
2822
|
sub _eval_keyword_title ($self, $data, $schema, $state) { |
|
1590
|
|
|
|
|
2732
|
|
|
1590
|
|
|
|
|
2519
|
|
|
1590
|
|
|
|
|
2582
|
|
|
1590
|
|
|
|
|
2374
|
|
|
1590
|
|
|
|
|
2424
|
|
44
|
1590
|
|
|
|
|
4638
|
annotate_self($state, $schema); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
60
|
|
|
60
|
|
261
|
sub _traverse_keyword_description { goto \&_traverse_keyword_title } |
48
|
|
|
|
|
|
|
|
49
|
101
|
|
|
101
|
|
388
|
sub _eval_keyword_description { goto \&_eval_keyword_title } |
50
|
|
|
|
|
|
|
|
51
|
207
|
|
|
207
|
|
539
|
sub _traverse_keyword_default { 1 } |
52
|
|
|
|
|
|
|
|
53
|
94
|
|
|
94
|
|
430
|
sub _eval_keyword_default { goto \&_eval_keyword_title } |
54
|
|
|
|
|
|
|
|
55
|
20
|
|
|
20
|
|
45
|
sub _traverse_keyword_deprecated ($self, $schema, $state) { |
|
20
|
|
|
|
|
33
|
|
|
20
|
|
|
|
|
34
|
|
|
20
|
|
|
|
|
31
|
|
|
20
|
|
|
|
|
38
|
|
56
|
20
|
50
|
|
|
|
58
|
return if not assert_keyword_type($state, $schema, 'boolean'); |
57
|
20
|
|
|
|
|
264
|
return 1; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
0
|
|
0
|
sub _eval_keyword_deprecated { goto \&_eval_keyword_title } |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
0
|
|
0
|
sub _traverse_keyword_readOnly { goto \&_traverse_keyword_deprecated } |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
0
|
|
0
|
sub _eval_keyword_readOnly { goto \&_eval_keyword_title } |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
0
|
|
0
|
sub _traverse_keyword_writeOnly { goto \&_traverse_keyword_deprecated } |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
0
|
|
0
|
sub _eval_keyword_writeOnly { goto \&_eval_keyword_title } |
69
|
|
|
|
|
|
|
|
70
|
13
|
|
|
13
|
|
30
|
sub _traverse_keyword_examples ($self, $schema, $state) { |
|
13
|
|
|
|
|
33
|
|
|
13
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
21
|
|
71
|
13
|
50
|
|
|
|
47
|
return if not assert_keyword_type($state, $schema, 'array'); |
72
|
13
|
|
|
|
|
40
|
return 1; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
9
|
|
|
9
|
|
43
|
sub _eval_keyword_examples { goto \&_eval_keyword_title } |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
__END__ |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=pod |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=encoding UTF-8 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 NAME |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
JSON::Schema::Modern::Vocabulary::MetaData - Implementation of the JSON Schema Meta-Data vocabulary |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 VERSION |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
version 0.572 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 DESCRIPTION |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=for Pod::Coverage vocabulary evaluation_order keywords |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=for stopwords metaschema |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Implementation of the JSON Schema Draft 2020-12 "Meta-Data" vocabulary, indicated in metaschemas |
100
|
|
|
|
|
|
|
with the URI C<https://json-schema.org/draft/2020-12/vocab/meta-data> and formally specified in |
101
|
|
|
|
|
|
|
L<https://json-schema.org/draft/2020-12/json-schema-validation.html#section-9>. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Support is also provided for |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=over 4 |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
the equivalent Draft 2019-09 keywords, indicated in metaschemas with the URI C<https://json-schema.org/draft/2019-09/vocab/meta-data> and formally specified in L<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-02#section-9>. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
the equivalent Draft 7 keywords that correspond to this vocabulary and are formally specified in L<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-10>. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=back |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=for stopwords OpenAPI |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 SUPPORT |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/karenetheridge/JSON-Schema-Modern/issues>. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
I am also usually active on irc, as 'ether' at C<irc.perl.org> and C<irc.libera.chat>. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
You can also find me on the L<JSON Schema Slack server|https://json-schema.slack.com> and L<OpenAPI Slack |
126
|
|
|
|
|
|
|
server|https://open-api.slack.com>, which are also great resources for finding help. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head1 AUTHOR |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Karen Etheridge. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
137
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=cut |