blib/lib/JSON/Schema/ToJSON.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 43 | 70 | 61.4 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
61 | 341 | 0 | 2 | $self->example_key and $$schema{$self->example_key} |
87 | 0 | 170 | 4 | defined $min and $schema->{'exclusiveMinimum'} |
88 | 0 | 170 | 4 | defined $max and $schema->{'exclusiveMaximum'} |
173 | 0 | 16 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
190 | 0 | 15 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
198 | 0 | 26 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
216 | 0 | 41 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
269 | 34 | 0 | 1 | $min and scalar keys %properties < $min |
283 | 33 | 1 | 1 | $max and scalar keys %properties > $max |
293 | 2 | 0 | 0 | $required and grep {$_ eq $property;} @{$required;} |
300 | 0 | 35 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
312 | 0 | 241 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
337 | 29 | 244 | 40 | $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 | 135 | 39 | $schema->{'minimum'} || 1 |
84 | 131 | 43 | $schema->{'maximum'} || 1000 |
125 | 0 | 147 | $schema->{'enum'} // [] |
403 | 308 | 0 | $schema_type //= 'null' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
152 | 3 | 117 | 0 | $schema->{'minLength'} || ($schema->{'maxLength'} ? $schema->{'maxLength'} - 1 : 10) |
155 | 3 | 117 | 0 | $schema->{'maxLength'} || ($schema->{'minLength'} ? $schema->{'minLength'} + 1 : 50) |
170 | 5 | 11 | 0 | $schema->{'minItems'} || ($schema->{'maxItems'} ? $schema->{'maxItems'} - 1 : 1) |
5 | 11 | 0 | $schema->{'maxItems'} || ($schema->{'minItems'} ? $schema->{'minItems'} + 1 : 5) | |
259 | 1 | 0 | 34 | $schema->{'minProperties'} || ($schema->{'maxProperties'} ? $schema->{'maxProperties'} - 1 : undef) |
262 | 2 | 0 | 33 | $schema->{'maxProperties'} || ($schema->{'minProperties'} ? $schema->{'minProperties'} + 1 : undef) |
264 | 1 | 1 | 33 | $min or $max |