Spec/Schema.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Spec/Run/Output.pm ↑ Summary Spec/Subcommand.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package App::Spec::Schema;
4  
5 1 our $VERSION = 'v0.15.1'; # TRIAL VERSION
6  
7 1 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 our @EXPORT_OK = qw/ $SCHEMA /;
9  
10 1 our $SCHEMA;
11  
12 # START INLINE
13 1 $SCHEMA = {
14 'additionalProperties' => '',
15 'definitions' => {
16 'bool' => {
17 'anyOf' => [
18 {
19 'type' => 'boolean'
20 },
21 {
22 'type' => 'integer'
23 },
24 {
25 'maxLength' => 0,
26 'type' => 'string'
27 }
28 ]
29 },
30 'command' => {
31 'additionalProperties' => '',
32 'properties' => {
33 'description' => {
34 'type' => 'string'
35 },
36 'op' => {
37 'type' => 'string'
38 },
39 'options' => {
40 '$ref' => '#/definitions/options'
41 },
42 'parameters' => {
43 '$ref' => '#/definitions/options'
44 },
45 'subcommands' => {
46 'additionalProperties' => '',
47 'patternProperties' => {
48 '^[a-zA-Z0-9_]+$' => {
49 '$ref' => '#/definitions/command'
50 }
51 },
52 'type' => 'object'
53 },
54 'summary' => {
55 'type' => 'string'
56 }
57 },
58 'type' => 'object'
59 },
60 'option' => {
61 'additionalProperties' => '',
62 'anyOf' => [
63 {
64 'required' => [
65 'name'
66 ]
67 },
68 {
69 'required' => [
70 'spec'
71 ]
72 }
73 ],
74 'properties' => {
75 'aliases' => {
76 'items' => {
77 'type' => 'string'
78 },
79 'type' => 'array'
80 },
81 'completion' => {
82 'oneOf' => [
83 {
84 'type' => 'object'
85 },
86 {
87 '$ref' => '#/definitions/bool'
88 }
89 ]
90 },
91 'default' => {
92 'type' => 'string'
93 },
94 'description' => {
95 'type' => 'string'
96 },
97 'enum' => {
98 'items' => {
99 'type' => 'string'
100 },
101 'type' => 'array'
102 },
103 'mapping' => {
104 '$ref' => '#/definitions/bool'
105 },
106 'multiple' => {
107 '$ref' => '#/definitions/bool'
108 },
109 'name' => {
110 'type' => 'string'
111 },
112 'required' => {
113 '$ref' => '#/definitions/bool'
114 },
115 'spec' => {
116 'type' => 'string'
117 },
118 'summary' => {
119 'type' => 'string'
120 },
121 'type' => {
122 'oneOf' => [
123 {
124 '$ref' => '#/definitions/optionTypeSimple'
125 }
126 ]
127 },
128 'unique' => {
129 '$ref' => '#/definitions/bool'
130 },
131 'values' => {
132 'additionalProperties' => '',
133 'properties' => {
134 'enum' => {
135 'items' => {
136 'type' => 'string'
137 },
138 'type' => 'array'
139 },
140 'mapping' => {
141 'type' => 'object'
142 },
143 'op' => {
144 'type' => 'string'
145 }
146 },
147 'type' => 'object'
148 }
149 },
150 'type' => [
151 'object',
152 'string'
153 ]
154 },
155 'optionTypeSimple' => {
156 'enum' => [
157 'flag',
158 'string',
159 'integer',
160 'float',
161 'file',
162 'filename',
163 'dir',
164 'dirname'
165 ]
166 },
167 'options' => {
168 'items' => {
169 '$ref' => '#/definitions/option'
170 },
171 'type' => 'array'
172 }
173 },
174 'properties' => {
175 'abstract' => {
176 'type' => 'string'
177 },
178 'appspec' => {
179 'additionalProperties' => '',
180 'properties' => {
181 'version' => {
182 'type' => 'number'
183 }
184 },
185 'required' => [
186 'version'
187 ],
188 'type' => 'object'
189 },
190 'class' => {
191 'type' => 'string'
192 },
193 'description' => {
194 'type' => 'string'
195 },
196 'markup' => {
197 'type' => 'string'
198 },
199 'name' => {
200 'type' => 'string'
201 },
202 'options' => {
203 '$ref' => '#/definitions/options'
204 },
205 'parameters' => {
206 '$ref' => '#/definitions/options'
207 },
208 'plugins' => {
209 'items' => {
210 'type' => 'string'
211 },
212 'type' => 'array'
213 },
214 'subcommands' => {
215 'additionalProperties' => '',
216 'patternProperties' => {
217 '^[a-zA-Z0-9_]+$' => {
218 '$ref' => '#/definitions/command'
219 }
220 },
221 'type' => 'object'
222 },
223 'title' => {
224 'type' => 'string'
225 }
226 },
227 'required' => [
228 'name',
229 'appspec'
230 ],
231 'type' => 'object'
232 };
233 # END INLINE
234  
235 1 1;
« Spec/Run/Output.pm ↑ Summary Spec/Subcommand.pm »