equal
deleted
inserted
replaced
82 |
82 |
83 -- arrays |
83 -- arrays |
84 maxItems : integer |
84 maxItems : integer |
85 minItems : integer |
85 minItems : integer |
86 uniqueItems : boolean |
86 uniqueItems : boolean |
87 maxContains : integer -- NYI |
87 maxContains : integer |
88 minContains : integer -- NYI |
88 minContains : integer |
89 |
89 |
90 -- objects |
90 -- objects |
91 maxProperties : integer -- NYI |
91 maxProperties : integer -- NYI |
92 minProperties : integer -- NYI |
92 minProperties : integer -- NYI |
93 required : { string } |
93 required : { string } |
427 end |
427 end |
428 end |
428 end |
429 end |
429 end |
430 |
430 |
431 if schema.contains ~= nil then |
431 if schema.contains ~= nil then |
432 local found = false |
432 local found = 0 |
433 for i = 1, #data do |
433 for i = 1, #data do |
434 if validate(schema.contains, data[i], root) then |
434 if validate(schema.contains, data[i], root) then |
435 found = true |
435 found = found + 1 |
436 break |
436 end |
437 end |
437 end |
438 end |
438 if found < (schema.minContains or 1) or found > (schema.maxContains or math.huge) then |
439 if not found then |
|
440 return false |
439 return false |
441 end |
440 end |
442 end |
441 end |
443 end |
442 end |
444 |
443 |