line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
31
|
|
|
31
|
|
17466
|
use strict; |
|
31
|
|
|
|
|
97
|
|
|
31
|
|
|
|
|
1216
|
|
2
|
31
|
|
|
31
|
|
338
|
use warnings; |
|
31
|
|
|
|
|
95
|
|
|
31
|
|
|
|
|
1757
|
|
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.571'; |
8
|
|
|
|
|
|
|
|
9
|
31
|
|
|
31
|
|
573
|
use 5.020; |
|
31
|
|
|
|
|
158
|
|
10
|
31
|
|
|
31
|
|
226
|
use Moo; |
|
31
|
|
|
|
|
99
|
|
|
31
|
|
|
|
|
196
|
|
11
|
31
|
|
|
31
|
|
12069
|
use strictures 2; |
|
31
|
|
|
|
|
254
|
|
|
31
|
|
|
|
|
1315
|
|
12
|
31
|
|
|
31
|
|
6392
|
use stable 0.031 'postderef'; |
|
31
|
|
|
|
|
586
|
|
|
31
|
|
|
|
|
562
|
|
13
|
31
|
|
|
31
|
|
4808
|
use experimental 'signatures'; |
|
31
|
|
|
|
|
249
|
|
|
31
|
|
|
|
|
319
|
|
14
|
31
|
|
|
31
|
|
2684
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
31
|
|
|
|
|
127
|
|
|
31
|
|
|
|
|
465
|
|
15
|
31
|
|
|
31
|
|
3051
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
31
|
|
|
|
|
137
|
|
|
31
|
|
|
|
|
410
|
|
16
|
31
|
|
|
31
|
|
3195
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
31
|
|
|
|
|
106
|
|
|
31
|
|
|
|
|
247
|
|
17
|
31
|
|
|
31
|
|
1693
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
31
|
|
|
|
|
108
|
|
|
31
|
|
|
|
|
199
|
|
18
|
31
|
|
|
31
|
|
1388
|
use JSON::Schema::Modern::Utilities qw(assert_keyword_type annotate_self); |
|
31
|
|
|
|
|
141
|
|
|
31
|
|
|
|
|
1945
|
|
19
|
31
|
|
|
31
|
|
264
|
use namespace::clean; |
|
31
|
|
|
|
|
106
|
|
|
31
|
|
|
|
|
255
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub vocabulary { |
24
|
15
|
|
|
15
|
0
|
68
|
'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
|
246
|
sub keywords ($self, $spec_version) { |
|
92
|
|
|
|
|
195
|
|
|
92
|
|
|
|
|
190
|
|
|
92
|
|
|
|
|
168
|
|
31
|
|
|
|
|
|
|
return ( |
32
|
92
|
100
|
|
|
|
2602
|
qw(title description default), |
33
|
|
|
|
|
|
|
$spec_version ne 'draft7' ? 'deprecated' : (), |
34
|
|
|
|
|
|
|
qw(readOnly writeOnly examples), |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
184
|
|
|
184
|
|
376
|
sub _traverse_keyword_title ($self, $schema, $state) { |
|
184
|
|
|
|
|
347
|
|
|
184
|
|
|
|
|
334
|
|
|
184
|
|
|
|
|
298
|
|
|
184
|
|
|
|
|
320
|
|
39
|
184
|
50
|
|
|
|
554
|
return if not assert_keyword_type($state, $schema, 'string'); |
40
|
184
|
|
|
|
|
584
|
return 1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
1590
|
|
|
1590
|
|
2745
|
sub _eval_keyword_title ($self, $data, $schema, $state) { |
|
1590
|
|
|
|
|
2735
|
|
|
1590
|
|
|
|
|
2499
|
|
|
1590
|
|
|
|
|
2474
|
|
|
1590
|
|
|
|
|
2526
|
|
|
1590
|
|
|
|
|
2268
|
|
44
|
1590
|
|
|
|
|
4544
|
annotate_self($state, $schema); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
60
|
|
|
60
|
|
246
|
sub _traverse_keyword_description { goto \&_traverse_keyword_title } |
48
|
|
|
|
|
|
|
|
49
|
101
|
|
|
101
|
|
357
|
sub _eval_keyword_description { goto \&_eval_keyword_title } |
50
|
|
|
|
|
|
|
|
51
|
207
|
|
|
207
|
|
574
|
sub _traverse_keyword_default { 1 } |
52
|
|
|
|
|
|
|
|
53
|
94
|
|
|
94
|
|
627
|
sub _eval_keyword_default { goto \&_eval_keyword_title } |
54
|
|
|
|
|
|
|
|
55
|
20
|
|
|
20
|
|
41
|
sub _traverse_keyword_deprecated ($self, $schema, $state) { |
|
20
|
|
|
|
|
39
|
|
|
20
|
|
|
|
|
33
|
|
|
20
|
|
|
|
|
37
|
|
|
20
|
|
|
|
|
33
|
|
56
|
20
|
50
|
|
|
|
59
|
return if not assert_keyword_type($state, $schema, 'boolean'); |
57
|
20
|
|
|
|
|
276
|
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
|
|
26
|
sub _traverse_keyword_examples ($self, $schema, $state) { |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
25
|
|
71
|
13
|
50
|
|
|
|
43
|
return if not assert_keyword_type($state, $schema, 'array'); |
72
|
13
|
|
|
|
|
41
|
return 1; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
9
|
|
|
9
|
|
41
|
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.571 |
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 |