blib/lib/JSON/Schema/ToJSON.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 42 | 70 | 60.0 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
61 | 107 | 0 | 2 | $self->example_key and $$schema{$self->example_key} |
87 | 0 | 75 | 4 | defined $min and $schema->{'exclusiveMinimum'} |
88 | 0 | 75 | 4 | defined $max and $schema->{'exclusiveMaximum'} |
173 | 0 | 12 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
190 | 0 | 23 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
198 | 0 | 22 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
216 | 0 | 45 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
269 | 6 | 0 | 1 | $min and scalar keys %properties < $min |
283 | 5 | 1 | 1 | $max and scalar keys %properties > $max |
293 | 2 | 0 | 0 | $required and grep {$_ eq $property;} @{$required;} |
300 | 0 | 7 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
312 | 0 | 34 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
337 | 0 | 96 | 1 | $schema->{'type'} and ref $schema->{'type'} eq "ARRAY" |
line | l | !l | condition |
---|---|---|---|
35 | 9 | 0 | $args{'schema_str'} || die('json_schema_to_json needs schema or schema_str arg') |
83 | 59 | 20 | $schema->{'minimum'} || 1 |
84 | 59 | 20 | $schema->{'maximum'} || 1000 |
125 | 0 | 20 | $schema->{'enum'} // [] |
403 | 97 | 0 | $schema_type //= "null" |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
152 | 3 | 8 | 0 | $schema->{'minLength'} || ($schema->{'maxLength'} ? $schema->{'maxLength'} - 1 : 10) |
155 | 3 | 8 | 0 | $schema->{'maxLength'} || ($schema->{'minLength'} ? $schema->{'minLength'} + 1 : 50) |
170 | 5 | 7 | 0 | $schema->{'minItems'} || ($schema->{'maxItems'} ? $schema->{'maxItems'} - 1 : 1) |
5 | 7 | 0 | $schema->{'maxItems'} || ($schema->{'minItems'} ? $schema->{'minItems'} + 1 : 5) | |
259 | 1 | 0 | 6 | $schema->{'minProperties'} || ($schema->{'maxProperties'} ? $schema->{'maxProperties'} - 1 : undef) |
262 | 2 | 0 | 5 | $schema->{'maxProperties'} || ($schema->{'minProperties'} ? $schema->{'minProperties'} + 1 : undef) |
264 | 1 | 1 | 5 | $min or $max |