Skip to content

Commit

Permalink
fix: wrong controller paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Jun 9, 2023
1 parent 94b426d commit 596dc31
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Bridge/Laravel/Http/Controllers/RedocController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class RedocController extends Controller
public function index(): View
{
$settings = config('open-docs.documentation_source');
$filePath = url('api-docs/' . $settings['filename'] . '.json');
$filePath = url($settings['filename'] . '.json');
$version = config('open-docs.frontend.redoc.version');

return view('open-docs::redoc.index', [
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Laravel/Http/Controllers/SwaggerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class SwaggerController extends Controller
public function index(): View
{
$settings = config('open-docs.documentation_source');
$filePath = url('api-docs/' . $settings['filename'] . '.json');
$filePath = url($settings['filename'] . '.json');
$version = config('open-docs.frontend.swagger.version');

return view('open-docs::swagger.index', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function it_gets_view_response_from_redoc_route(): void

$response->assertStatus(200);
$response->assertViewIs('open-docs::redoc.index');
$response->assertViewHas('documentationFile', URL::to('api-docs/openapi.json'));
$response->assertViewHas('documentationFile', URL::to('openapi.json'));
$response->assertViewHas('redocVersion', '2.0.0');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function it_gets_view_response_from_swagger_route(): void

$response->assertStatus(200);
$response->assertViewIs('open-docs::swagger.index');
$response->assertViewHas('documentationFile', URL::to('api-docs/openapi.json'));
$response->assertViewHas('documentationFile', URL::to('openapi.json'));
$response->assertViewHas('swaggerVersion', config('open-docs.frontend.swagger.version'));
}
}

0 comments on commit 596dc31

Please sign in to comment.