Condition Coverage

blib/lib/Mojolicious/Plugin/Swagger2.pm
Criterion Covered Total %
condition 36 56 64.2


and 3 conditions

line !l l&&!r l&&r condition
20 0 5 0 $_[1]{'op'} and $_[1]{'id'}
0 0 5 $_[1]{'op'} and $_[1]{'id'} and ref $_[1]{'params'} eq 'HASH'
104 40 1 0 $r and not $r->pattern->unparsed
137 1 80 2 not $op_spec->{'x-mojo-around-action'} and $around_action
139 77 4 2 not $op_spec->{'x-mojo-controller'} and $controller
212 38 24 1 $p->{'in'} eq 'path' and defined $p->{'default'}

or 2 conditions

line l !l condition
25 5 0 $_[2] || 200
52 3 0 shift() || 200
76 41 0 $swagger->api_spec->get('/paths') || {}
80 0 41 $config->{'validate'} // 1
132 2 23 $parameters{$name}{'x-mojo-placeholder'} || ':'
146 0 41 $config->{'spec_path'} // '/'
160 0 2 $responses->{'exception'} ||= 'Internal server error.'
161 0 2 $responses->{'not_found'} ||= 'Not found.'
201 85 9 shift() || 200
244 2 2 $c->stash('format') || 'json'

or 3 conditions

line l !l&&r !l&&!r condition
34 2 0 0 $data->{'params'}{$name} // $p->{'default'}
74 0 41 0 $config->{'swagger'} || 'Swagger2'->new->load($config->{'url'} || '"url" is missing')
93 0 0 41 $config->{'coerce'} || $ENV{'SWAGGER_COERCE_VALUES'}
121 1 1 72 $paths->{$path}{'x-mojo-around-action'} || $swagger->api_spec->get('/x-mojo-around-action')
123 1 1 72 $paths->{$path}{'x-mojo-controller'} || $swagger->api_spec->get('/x-mojo-controller')
219 6 0 0 $c->can($around_action) || $around_action