kwalify 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -1
- data/README.txt +1 -1
- data/bin/kwalify +1 -1
- data/doc/users-guide.html +328 -62
- data/examples/address-book/Makefile +2 -2
- data/examples/address-book/address-book.schema.yaml +1 -1
- data/examples/invoice/Makefile +2 -2
- data/examples/invoice/invoice.schema.yaml +1 -1
- data/examples/tapkit/Makefile +2 -2
- data/examples/tapkit/tapkit.schema.yaml +1 -1
- data/lib/kwalify.rb +4 -3
- data/lib/kwalify/errors.rb +13 -3
- data/lib/kwalify/main-program.rb +60 -21
- data/lib/kwalify/messages.rb +1 -1
- data/lib/kwalify/meta-validator.rb +7 -7
- data/lib/kwalify/parser.rb +759 -0
- data/lib/kwalify/rule.rb +13 -7
- data/lib/kwalify/types.rb +12 -11
- data/lib/kwalify/util/assert-diff.rb +1 -1
- data/lib/kwalify/util/option-parser.rb +1 -1
- data/lib/kwalify/util/yaml-helper.rb +1 -1
- data/lib/kwalify/validator.rb +55 -47
- data/test/test-metavalidator.rb +16 -11
- data/test/test-parser.rb +1276 -0
- data/test/test-validator.rb +172 -87
- data/test/test.rb +13 -16
- data/todo.txt +1 -1
- metadata +57 -50
- data/test/test-metavalidator.rb.error +0 -490
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
|
2
|
-
rubygems_version: 0.8.
|
1
|
+
!ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.11
|
3
3
|
specification_version: 1
|
4
4
|
name: kwalify
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2005-10-
|
6
|
+
version: 0.4.0
|
7
|
+
date: 2005-10-25 00:00:00 +09:00
|
8
8
|
summary: a tiny schema validator for YAML document.
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- lib
|
11
11
|
email:
|
12
12
|
homepage: http://www.kuwata-lab.com/kwalify
|
13
13
|
rubyforge_project:
|
@@ -18,58 +18,65 @@ bindir: bin
|
|
18
18
|
has_rdoc: false
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
25
24
|
version:
|
26
25
|
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
27
28
|
authors:
|
28
|
-
|
29
|
+
- kwatch
|
29
30
|
files:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
31
|
+
- lib/kwalify
|
32
|
+
- lib/kwalify.rb
|
33
|
+
- lib/kwalify/errors.rb
|
34
|
+
- lib/kwalify/main-program.rb
|
35
|
+
- lib/kwalify/messages.rb
|
36
|
+
- lib/kwalify/meta-validator.rb
|
37
|
+
- lib/kwalify/parser.rb
|
38
|
+
- lib/kwalify/rule.rb
|
39
|
+
- lib/kwalify/types.rb
|
40
|
+
- lib/kwalify/util
|
41
|
+
- lib/kwalify/validator.rb
|
42
|
+
- lib/kwalify/util/assert-diff.rb
|
43
|
+
- lib/kwalify/util/option-parser.rb
|
44
|
+
- lib/kwalify/util/yaml-helper.rb
|
45
|
+
- bin/kwalify
|
46
|
+
- examples/address-book
|
47
|
+
- examples/invoice
|
48
|
+
- examples/tapkit
|
49
|
+
- examples/address-book/address-book.schema.yaml
|
50
|
+
- examples/address-book/address-book.yaml
|
51
|
+
- examples/address-book/Makefile
|
52
|
+
- examples/invoice/invoice.schema.yaml
|
53
|
+
- examples/invoice/invoice.yaml
|
54
|
+
- examples/invoice/Makefile
|
55
|
+
- examples/tapkit/Makefile
|
56
|
+
- examples/tapkit/tapkit.schema.yaml
|
57
|
+
- examples/tapkit/tapkit.yaml
|
58
|
+
- test/test-metavalidator.rb
|
59
|
+
- test/test-parser.rb
|
60
|
+
- test/test-validator.rb
|
61
|
+
- test/test.rb
|
62
|
+
- doc/users-guide.html
|
63
|
+
- doc/docstyle.css
|
64
|
+
- README.txt
|
65
|
+
- ChangeLog
|
66
|
+
- COPYING
|
67
|
+
- setup.rb
|
68
|
+
- todo.txt
|
67
69
|
test_files:
|
68
|
-
|
70
|
+
- test/test.rb
|
69
71
|
rdoc_options: []
|
72
|
+
|
70
73
|
extra_rdoc_files: []
|
74
|
+
|
71
75
|
executables:
|
72
|
-
|
76
|
+
- kwalify
|
73
77
|
extensions: []
|
78
|
+
|
74
79
|
requirements: []
|
75
|
-
|
80
|
+
|
81
|
+
dependencies: []
|
82
|
+
|
@@ -1,490 +0,0 @@
|
|
1
|
-
###
|
2
|
-
### $Rev: 16 $
|
3
|
-
### $Release: 0.3.0 $
|
4
|
-
### copyright(c) 2005 kuwata-lab all rights reserved.
|
5
|
-
###
|
6
|
-
|
7
|
-
if $0 == __FILE__
|
8
|
-
testdir = File.dirname(__FILE__)
|
9
|
-
libdir = File.dirname(testdir) + "/lib"
|
10
|
-
$LOAD_PATH << libdir << testdir
|
11
|
-
require 'test/unit'
|
12
|
-
require 'test/unit/ui/console/testrunner'
|
13
|
-
require 'kwalify'
|
14
|
-
require 'kwalify/util/assert-diff'
|
15
|
-
require 'yaml'
|
16
|
-
end
|
17
|
-
|
18
|
-
|
19
|
-
class MetaValidatorTest < Test::Unit::TestCase
|
20
|
-
|
21
|
-
## define test methods
|
22
|
-
#str = DATA.read() # doesn't work when required by other script
|
23
|
-
str = File.read(__FILE__)
|
24
|
-
str.gsub!(/.*^__END__$/m, '')
|
25
|
-
name_table = {}
|
26
|
-
YAML.load_documents(str) do |doc|
|
27
|
-
doc.default = ''
|
28
|
-
!name_table.key?(doc['name']) or raise "*** test name '#{doc['name']}' is duplicated."
|
29
|
-
name_table[doc['name']] = true
|
30
|
-
s = <<-END
|
31
|
-
def test_meta_#{doc['name']}
|
32
|
-
@name = #{doc['name'].dump}
|
33
|
-
@desc = #{doc['desc'].dump}
|
34
|
-
@schema = #{doc['schema'].dump}
|
35
|
-
@meta_msg = #{doc['meta-msg'].dump}
|
36
|
-
# @rule_msg = #{doc['rule-msg'].dump}
|
37
|
-
_test(:meta)
|
38
|
-
end
|
39
|
-
def test_rule_#{doc['name']}
|
40
|
-
@name = #{doc['name'].dump}
|
41
|
-
@desc = #{doc['desc'].dump}
|
42
|
-
@schema = #{doc['schema'].dump}
|
43
|
-
# @meta_msg = #{doc['meta-msg'].dump}
|
44
|
-
@rule_msg = #{doc['rule-msg'].dump}
|
45
|
-
_test(:rule)
|
46
|
-
end
|
47
|
-
END
|
48
|
-
eval s
|
49
|
-
end
|
50
|
-
|
51
|
-
## execute test
|
52
|
-
def _test(test_type)
|
53
|
-
return if $target && $target != @name
|
54
|
-
schema = YAML.load(@schema)
|
55
|
-
case test_type
|
56
|
-
when :meta
|
57
|
-
meta_validator = Kwalify.meta_validator()
|
58
|
-
errors = meta_validator.validate(schema)
|
59
|
-
expected = @meta_msg
|
60
|
-
when :rule
|
61
|
-
errors = []
|
62
|
-
begin
|
63
|
-
rule = Kwalify::Validator.new(schema)
|
64
|
-
rescue Kwalify::KwalifyError => error
|
65
|
-
errors << error
|
66
|
-
end
|
67
|
-
expected = @rule_msg
|
68
|
-
end
|
69
|
-
actual = ''
|
70
|
-
errors.each do |error|
|
71
|
-
raise error if error.is_a?(Kwalify::AssertionError)
|
72
|
-
actual << "%-20s: %s\n" % [error.error_symbol.inspect, error.message]
|
73
|
-
end
|
74
|
-
if $print
|
75
|
-
print actual
|
76
|
-
else
|
77
|
-
assert_equal_with_diff(expected, actual)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
end
|
82
|
-
|
83
|
-
__END__
|
84
|
-
---
|
85
|
-
name: schema_notmap
|
86
|
-
desc: schema_notmap
|
87
|
-
#
|
88
|
-
schema: |
|
89
|
-
- type: str
|
90
|
-
- type: int
|
91
|
-
#
|
92
|
-
meta-msg: |
|
93
|
-
:type_unmatch : [/] not a mapping.
|
94
|
-
#
|
95
|
-
rule-msg: |
|
96
|
-
:schema_notmap : [/] schema definition is not a mapping.
|
97
|
-
# :invalid_schema : [/] schema definition is invalid.
|
98
|
-
#
|
99
|
-
---
|
100
|
-
name: type_unknown
|
101
|
-
desc: type_unknown
|
102
|
-
#
|
103
|
-
schema: |
|
104
|
-
type: map
|
105
|
-
mapping:
|
106
|
-
"name1":
|
107
|
-
type: str
|
108
|
-
"name2":
|
109
|
-
type: string
|
110
|
-
"age1":
|
111
|
-
type: int
|
112
|
-
"age2":
|
113
|
-
type: integer
|
114
|
-
"desc1":
|
115
|
-
type: text
|
116
|
-
"amount1":
|
117
|
-
type: float
|
118
|
-
"amount2":
|
119
|
-
type: number
|
120
|
-
"birth1":
|
121
|
-
type: date
|
122
|
-
"birth2":
|
123
|
-
type: time
|
124
|
-
"birth3":
|
125
|
-
type: timestamp
|
126
|
-
"data1":
|
127
|
-
type: scalar
|
128
|
-
"data2":
|
129
|
-
type: schalar
|
130
|
-
#
|
131
|
-
meta-msg: |
|
132
|
-
:enum_notexist : [/mapping/age2/type] 'integer': invalid type value.
|
133
|
-
:enum_notexist : [/mapping/name2/type] 'string': invalid type value.
|
134
|
-
:enum_notexist : [/mapping/data2/type] 'schalar': invalid type value.
|
135
|
-
#
|
136
|
-
rule-msg: |
|
137
|
-
:type_unknown : [/mapping/data2/type] 'schalar': unknown type.
|
138
|
-
# :type_unknown : [/mapping/data2] type 'schalar' is not found.
|
139
|
-
#
|
140
|
-
---
|
141
|
-
name: required_notbool
|
142
|
-
desc: required_notbool
|
143
|
-
#
|
144
|
-
schema: |
|
145
|
-
type: map
|
146
|
-
mapping:
|
147
|
-
"name":
|
148
|
-
type: str
|
149
|
-
required: 1
|
150
|
-
#
|
151
|
-
meta-msg: |
|
152
|
-
:type_unmatch : [/mapping/name/required] '1': not a boolean.
|
153
|
-
#
|
154
|
-
rule-msg: |
|
155
|
-
:required_notbool : [/mapping/name/required] '1': not a boolean.
|
156
|
-
# :required_notbool : [/mapping/name] 'required:' is not boolean.
|
157
|
-
#
|
158
|
-
---
|
159
|
-
name: pattern_syntaxerr
|
160
|
-
desc: pattern_syntaxerr
|
161
|
-
#
|
162
|
-
schema: |
|
163
|
-
type: str
|
164
|
-
pattern: /[A-/
|
165
|
-
#
|
166
|
-
meta-msg: |
|
167
|
-
:pattern_syntaxerr : [/pattern] '/[A-/': has regexp error.
|
168
|
-
#
|
169
|
-
rule-msg: |
|
170
|
-
:pattern_syntaxerr : [/pattern] '/[A-/': has regexp error.
|
171
|
-
# :pattern_syntaxerr : [/] 'pattern:' has regexp error (= /[A-/).
|
172
|
-
#
|
173
|
-
---
|
174
|
-
name: enum_notseq
|
175
|
-
desc: enum_notseq
|
176
|
-
#
|
177
|
-
schema: |
|
178
|
-
type: str
|
179
|
-
enum: A, B, C
|
180
|
-
#
|
181
|
-
meta-msg: |
|
182
|
-
:type_unmatch : [/enum] 'A, B, C': not a sequence.
|
183
|
-
#
|
184
|
-
rule-msg: |
|
185
|
-
:enum_notseq : [/enum] 'A, B, C': not a sequence.
|
186
|
-
# :enum_notseq : [/] 'enum:' is not a sequence.
|
187
|
-
#
|
188
|
-
---
|
189
|
-
name: assert_notstr
|
190
|
-
desc: assert_notstr
|
191
|
-
#
|
192
|
-
schema: |
|
193
|
-
type: number
|
194
|
-
assert: 100
|
195
|
-
#
|
196
|
-
meta-msg: |
|
197
|
-
:type_unmatch : [/assert] '100': not a string.
|
198
|
-
#
|
199
|
-
rule-msg: |
|
200
|
-
:assert_notstr : [/assert] '100': not a string.
|
201
|
-
# :assert_notstr : [/] 'assert:' is not a string.
|
202
|
-
#
|
203
|
-
---
|
204
|
-
name: assert_noval
|
205
|
-
desc: assert_noval
|
206
|
-
#
|
207
|
-
schema: |
|
208
|
-
type: int
|
209
|
-
assert: value > 100
|
210
|
-
#
|
211
|
-
meta-msg: |
|
212
|
-
:pattern_unmatch : [/assert] 'value > 100': not matched to pattern /\bval\b/.
|
213
|
-
#
|
214
|
-
rule-msg: |
|
215
|
-
:assert_noval : [/assert] 'value > 100': 'val' is not used.
|
216
|
-
---
|
217
|
-
name: assert_syntaxerr
|
218
|
-
desc: assert_syntaxerr
|
219
|
-
#
|
220
|
-
schema: |
|
221
|
-
type: int
|
222
|
-
assert: 0 < val &&
|
223
|
-
#
|
224
|
-
meta-msg: |
|
225
|
-
:assert_syntaxerr : [/assert] '0 < val &&': expression syntax error.
|
226
|
-
#
|
227
|
-
rule-msg: |
|
228
|
-
:assert_syntaxerr : [/assert] '0 < val &&': expression syntax error.
|
229
|
-
#
|
230
|
-
---
|
231
|
-
name: range_notmap
|
232
|
-
desc: range_notmap
|
233
|
-
#
|
234
|
-
schema: |
|
235
|
-
type: int
|
236
|
-
range: 0 < val && val < 100
|
237
|
-
#
|
238
|
-
meta-msg: |
|
239
|
-
:type_unmatch : [/range] '0 < val && val < 100': not a mapping.
|
240
|
-
#
|
241
|
-
rule-msg: |
|
242
|
-
:range_notmap : [/range] '0 < val && val < 100': not a mapping.
|
243
|
-
#
|
244
|
-
---
|
245
|
-
name: range_type_unmatch
|
246
|
-
desc: range_type_unmatch
|
247
|
-
#
|
248
|
-
schema: |
|
249
|
-
type: int
|
250
|
-
range: { max: 10, min: 1.0 }
|
251
|
-
#
|
252
|
-
meta-msg: |
|
253
|
-
:range_type_unmatch : [/range/min] '1.0': not a integer.
|
254
|
-
#
|
255
|
-
rule-msg: |
|
256
|
-
:range_type_unmatch : [/range/min] '1.0': not a integer.
|
257
|
-
---
|
258
|
-
name: range_undefined
|
259
|
-
desc: range_undefined
|
260
|
-
#
|
261
|
-
schema: |
|
262
|
-
type: int
|
263
|
-
range: { max: 10, mim: 1 }
|
264
|
-
#
|
265
|
-
meta-msg: |
|
266
|
-
:key_undefined : [/range] key 'mim:' is undefined.
|
267
|
-
# :key_undefined : [/range] 'mim:': undefined key.
|
268
|
-
#
|
269
|
-
rule-msg: |
|
270
|
-
:range_undefined : [/range] 'mim:': undefined key.
|
271
|
-
# :range_undefined : [/range] key 'mim:' undefined key.
|
272
|
-
#
|
273
|
-
---
|
274
|
-
name: length_notmap
|
275
|
-
desc: length_notmap
|
276
|
-
#
|
277
|
-
schema: |
|
278
|
-
type: text
|
279
|
-
length: [ max:10, min:4 ]
|
280
|
-
#
|
281
|
-
meta-msg: |
|
282
|
-
:type_unmatch : [/length] not a mapping.
|
283
|
-
#
|
284
|
-
rule-msg: |
|
285
|
-
:length_notmap : [/length] not a mapping.
|
286
|
-
#
|
287
|
-
---
|
288
|
-
name: length_notint
|
289
|
-
desc: length_notint
|
290
|
-
#
|
291
|
-
schema: |
|
292
|
-
type: text
|
293
|
-
length: { max: 10.1 }
|
294
|
-
#
|
295
|
-
meta-msg: |
|
296
|
-
:type_unmatch : [/length/max] '10.1': not a integer.
|
297
|
-
#
|
298
|
-
rule-msg: |
|
299
|
-
:length_notint : [/length/max] '10.1': not an integer.
|
300
|
-
#
|
301
|
-
---
|
302
|
-
name: length_undefined
|
303
|
-
desc: length_undefined
|
304
|
-
#
|
305
|
-
schema: |
|
306
|
-
type: text
|
307
|
-
length: { maximum: 10 }
|
308
|
-
#
|
309
|
-
meta-msg: |
|
310
|
-
:key_undefined : [/length] key 'maximum:' is undefined.
|
311
|
-
# :key_undefined : [/length] 'maximum:': undefined key.
|
312
|
-
#
|
313
|
-
rule-msg: |
|
314
|
-
:length_undefined : [/length] 'maximum:': undefined key.
|
315
|
-
# :length_undefined : [/length] key 'maximum:' is undefined.
|
316
|
-
#
|
317
|
-
---
|
318
|
-
name: sequence_notseq
|
319
|
-
desc: sequence_notseq
|
320
|
-
#
|
321
|
-
schema: |
|
322
|
-
type: seq
|
323
|
-
sequence: |
|
324
|
-
- type: str
|
325
|
-
#
|
326
|
-
meta-msg: |
|
327
|
-
:type_unmatch : [/sequence] '- type: str\n': not a sequence.
|
328
|
-
#
|
329
|
-
rule-msg: |
|
330
|
-
:sequence_notseq : [/sequence] '- type: str\n': not a sequence.
|
331
|
-
#
|
332
|
-
---
|
333
|
-
name: sequence_noelem
|
334
|
-
desc: sequence_noelem
|
335
|
-
#
|
336
|
-
schema: |
|
337
|
-
type: seq
|
338
|
-
sequence:
|
339
|
-
#
|
340
|
-
meta-msg: |
|
341
|
-
:sequence_noelem : [/sequence] required one element.
|
342
|
-
# :type_unmatch : [/sequence] not a sequence.
|
343
|
-
#
|
344
|
-
rule-msg: |
|
345
|
-
:sequence_noelem : [/sequence] required one element.
|
346
|
-
#
|
347
|
-
---
|
348
|
-
name: sequence_toomany
|
349
|
-
desc: sequence_toomany
|
350
|
-
#
|
351
|
-
schema: |
|
352
|
-
type: seq
|
353
|
-
sequence:
|
354
|
-
- type: text
|
355
|
-
- type: text
|
356
|
-
#
|
357
|
-
meta-msg: |
|
358
|
-
:sequence_toomany : [/sequence] required just one element.
|
359
|
-
#
|
360
|
-
rule-msg: |
|
361
|
-
:sequence_toomany : [/sequence] required just one element.
|
362
|
-
#
|
363
|
-
---
|
364
|
-
name: mapping_notmap
|
365
|
-
desc: mapping_notmap
|
366
|
-
#
|
367
|
-
schema: |
|
368
|
-
type: map
|
369
|
-
mapping: |
|
370
|
-
"name":
|
371
|
-
type: str
|
372
|
-
#
|
373
|
-
meta-msg: |
|
374
|
-
:type_unmatch : [/mapping] '"name":\n type: str\n': not a mapping.
|
375
|
-
#
|
376
|
-
rule-msg: |
|
377
|
-
:mapping_notmap : [/mapping] '"name":\n type: str\n': not a mapping.
|
378
|
-
#
|
379
|
-
---
|
380
|
-
name: mapping_noelem
|
381
|
-
desc: mapping_noelem
|
382
|
-
#
|
383
|
-
schema: |
|
384
|
-
type: map
|
385
|
-
mapping:
|
386
|
-
#
|
387
|
-
meta-msg: |
|
388
|
-
:mapping_noelem : [/mapping] required at least one element.
|
389
|
-
#
|
390
|
-
rule-msg: |
|
391
|
-
:mapping_noelem : [/mapping] required at least one element.
|
392
|
-
#
|
393
|
-
---
|
394
|
-
name: key_unknown
|
395
|
-
desc: key_unknown
|
396
|
-
#
|
397
|
-
schema: |
|
398
|
-
type: str
|
399
|
-
values:
|
400
|
-
- one
|
401
|
-
- two
|
402
|
-
#
|
403
|
-
meta-msg: |
|
404
|
-
:key_undefined : [/] key 'values:' is undefined.
|
405
|
-
# :key_undefined : [/] 'values:': undefined key.
|
406
|
-
#
|
407
|
-
rule-msg: |
|
408
|
-
:key_unknown : [/] 'values:': unknown key.
|
409
|
-
# :key_unknown : [/] key 'values:' is unknown.
|
410
|
-
#
|
411
|
-
---
|
412
|
-
name: seq_nosequence
|
413
|
-
desc: seq_nosequence
|
414
|
-
#
|
415
|
-
schema: |
|
416
|
-
type: seq
|
417
|
-
#
|
418
|
-
meta-msg: |
|
419
|
-
:seq_nosequence : [/] type 'seq' requires 'sequence:'.
|
420
|
-
#
|
421
|
-
rule-msg: |
|
422
|
-
:seq_nosequence : [/] type 'seq' requires 'sequence:'.
|
423
|
-
#
|
424
|
-
---
|
425
|
-
name: seq_conflict
|
426
|
-
desc: seq_conflict
|
427
|
-
#
|
428
|
-
schema: |
|
429
|
-
type: seq
|
430
|
-
mapping: { name: {type: str} }
|
431
|
-
sequence:
|
432
|
-
- type: str
|
433
|
-
# pattern: /abc/
|
434
|
-
# range: { max: 10 }
|
435
|
-
# length: { max: 10 }
|
436
|
-
# enum: [ A, B, C ]
|
437
|
-
#
|
438
|
-
meta-msg: |
|
439
|
-
:seq_conflict : [/] 'mapping:': not available with sequence.
|
440
|
-
# :seq_conflict : [/] 'enum:': not available with sequence.
|
441
|
-
# :seq_conflict : [/] 'pattern:': not available with sequence.
|
442
|
-
# :seq_conflict : [/] 'range:': not available with sequence.
|
443
|
-
# :seq_conflict : [/] 'length:': not available with sequence.
|
444
|
-
#
|
445
|
-
rule-msg: |
|
446
|
-
:seq_conflict : [/] 'mapping:': not available with sequence.
|
447
|
-
# :enum_notscalar : [/] 'enum:': not available with seq or map.
|
448
|
-
# :seq_conflict : [/] 'enum:': not available with sequence.
|
449
|
-
# :seq_conflict : [/] 'pattern:': not available with sequence.
|
450
|
-
# :seq_conflict : [/] 'range:': not available with sequence.
|
451
|
-
# :seq_conflict : [/] 'length:': not available with sequence.
|
452
|
-
#
|
453
|
-
---
|
454
|
-
name: map_nomapping
|
455
|
-
desc: map_nomapping
|
456
|
-
#
|
457
|
-
schema: |
|
458
|
-
type: map
|
459
|
-
required: true
|
460
|
-
#
|
461
|
-
meta-msg: |
|
462
|
-
:map_nomapping : [/] type 'map' requires 'mapping:'.
|
463
|
-
#
|
464
|
-
rule-msg: |
|
465
|
-
:map_nomapping : [/] type 'map' requires 'mapping:'.
|
466
|
-
#
|
467
|
-
---
|
468
|
-
name: enum_conflict
|
469
|
-
desc: enum_conflict
|
470
|
-
#
|
471
|
-
schema: |
|
472
|
-
type: str
|
473
|
-
required: yes
|
474
|
-
enum:
|
475
|
-
- aa
|
476
|
-
- bb
|
477
|
-
range: { max: aa, min: xx }
|
478
|
-
length: { max: 3 }
|
479
|
-
pattern: /0/
|
480
|
-
#
|
481
|
-
meta-msg: |
|
482
|
-
:enum_conflict : [/] 'range:': not available with 'enum:'.
|
483
|
-
:enum_conflict : [/] 'length:': not available with 'enum:'.
|
484
|
-
:enum_conflict : [/] 'pattern:': not available with 'enum:'.
|
485
|
-
#
|
486
|
-
rule-msg: |
|
487
|
-
:enum_conflict : [/] 'range:': not available with 'enum:'.
|
488
|
-
# :enum_conflict : [/] 'length:': not available with 'enum:'.
|
489
|
-
# :enum_conflict : [/] 'pattern:': not available with 'enum:'.
|
490
|
-
#
|