| blib/lib/Mojolicious/Plugin/Swagger2.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 36 | 56 | 64.2 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 18 | 0 | 5 | 0 | $_[1]{'op'} and $_[1]{'id'} |
| 0 | 0 | 5 | $_[1]{'op'} and $_[1]{'id'} and ref $_[1]{'params'} eq 'HASH' | |
| 102 | 39 | 1 | 0 | $r and not $r->pattern->unparsed |
| 135 | 1 | 77 | 2 | not $op_spec->{'x-mojo-around-action'} and $around_action |
| 137 | 74 | 4 | 2 | not $op_spec->{'x-mojo-controller'} and $controller |
| 210 | 37 | 23 | 1 | $p->{'in'} eq 'path' and defined $p->{'default'} |
| line | l | !l | condition |
|---|---|---|---|
| 23 | 5 | 0 | $_[2] || 200 |
| 50 | 3 | 0 | shift() || 200 |
| 74 | 40 | 0 | $swagger->api_spec->get('/paths') || {} |
| 78 | 0 | 40 | $config->{'validate'} // 1 |
| 130 | 2 | 22 | $parameters{$name}{'x-mojo-placeholder'} || ':' |
| 144 | 0 | 40 | $config->{'spec_path'} // '/' |
| 158 | 0 | 2 | $responses->{'exception'} ||= 'Internal server error.' |
| 159 | 0 | 2 | $responses->{'not_found'} ||= 'Not found.' |
| 199 | 84 | 9 | shift() || 200 |
| 242 | 2 | 2 | $c->stash('format') || 'json' |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 32 | 2 | 0 | 0 | $data->{'params'}{$name} // $p->{'default'} |
| 72 | 0 | 40 | 0 | $config->{'swagger'} || 'Swagger2'->new->load($config->{'url'} || '"url" is missing') |
| 91 | 0 | 0 | 40 | $config->{'coerce'} || $ENV{'SWAGGER_COERCE_VALUES'} |
| 119 | 1 | 1 | 70 | $paths->{$path}{'x-mojo-around-action'} || $swagger->api_spec->get('/x-mojo-around-action') |
| 121 | 1 | 1 | 70 | $paths->{$path}{'x-mojo-controller'} || $swagger->api_spec->get('/x-mojo-controller') |
| 217 | 6 | 0 | 0 | $c->can($around_action) || $around_action |