• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RonasIT / laravel-swagger / 23854697051

01 Apr 2026 02:47PM UTC coverage: 99.352% (-0.3%) from 99.656%
23854697051

Pull #198

github

web-flow
Merge 1d6e53c6d into 4818bc24b
Pull Request #198: feat: expand with[] and with_count[] into separate query params per relation

70 of 73 new or added lines in 5 files covered. (95.89%)

1 existing line in 1 file now uncovered.

920 of 926 relevant lines covered (99.35%)

21.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/src/Http/Controllers/AutoDocController.php
1
<?php
2

3
namespace RonasIT\AutoDoc\Http\Controllers;
4

5
use Illuminate\Http\Request;
6
use Illuminate\Routing\Controller as BaseController;
7
use RonasIT\AutoDoc\Services\SwaggerService;
8
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
9

10
class AutoDocController extends BaseController
11
{
12
    protected $service;
13
    protected $documentationViewer;
14

15
    public function __construct()
16
    {
17
        $this->service = app(SwaggerService::class);
16✔
18
        $this->documentationViewer = config('auto-doc.documentation_viewer');
16✔
19
    }
20

21
    public function documentation()
22
    {
23
        $documentation = $this->service->getDocFileContent();
6✔
24

25
        return response()->json($documentation);
6✔
26
    }
27

28
    public function documentationForViewer()
29
    {
NEW
30
        $documentation = $this->service->getCollapsedDocFileContent();
×
31

NEW
32
        return response()->json($documentation);
×
33
    }
34

35
    public function index()
36
    {
37
        $currentEnvironment = config('app.env');
6✔
38

39
        if (in_array($currentEnvironment, config('auto-doc.display_environments'))) {
6✔
40
            return view("auto-doc::documentation-{$this->documentationViewer}");
5✔
41
        }
42

43
        return response('Forbidden.', 403);
1✔
44
    }
45

46
    public function getFile(Request $request, $file)
47
    {
48
        $filePath = __DIR__ . "/../../../resources/assets/{$this->documentationViewer}/" . $file;
4✔
49

50
        if (!file_exists($filePath)) {
4✔
51
            throw new NotFoundHttpException();
1✔
52
        }
53

54
        $content = file_get_contents($filePath);
3✔
55

56
        return response($content)->header('Content-Type', $request->getAcceptableContentTypes());
3✔
57
    }
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc