| blib/lib/JSON/Schema/ToJSON.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 43 | 70 | 61.4 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 61 | 325 | 0 | 2 | $self->example_key and $$schema{$self->example_key} |
| 87 | 0 | 165 | 4 | defined $min and $schema->{'exclusiveMinimum'} |
| 88 | 0 | 165 | 4 | defined $max and $schema->{'exclusiveMaximum'} |
| 173 | 0 | 16 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
| 190 | 0 | 18 | 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 | 40 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
| 269 | 33 | 0 | 1 | $min and scalar keys %properties < $min |
| 283 | 32 | 1 | 1 | $max and scalar keys %properties > $max |
| 293 | 2 | 0 | 0 | $required and grep {$_ eq $property;} @{$required;} |
| 300 | 0 | 34 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
| 312 | 0 | 236 | 0 | $self->max_depth and $self->_depth >= $self->max_depth |
| 337 | 31 | 236 | 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 | 126 | 43 | $schema->{'minimum'} || 1 |
| 84 | 123 | 46 | $schema->{'maximum'} || 1000 |
| 125 | 0 | 134 | $schema->{'enum'} // [] |
| 403 | 302 | 0 | $schema_type //= 'null' |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 152 | 3 | 106 | 0 | $schema->{'minLength'} || ($schema->{'maxLength'} ? $schema->{'maxLength'} - 1 : 10) |
| 155 | 3 | 106 | 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 | 33 | $schema->{'minProperties'} || ($schema->{'maxProperties'} ? $schema->{'maxProperties'} - 1 : undef) |
| 262 | 2 | 0 | 32 | $schema->{'maxProperties'} || ($schema->{'minProperties'} ? $schema->{'minProperties'} + 1 : undef) |
| 264 | 1 | 1 | 32 | $min or $max |