diff --git a/src/Http/Controllers/SwaggerLumeController.php b/src/Http/Controllers/SwaggerLumeController.php index 3f67fdb..d300455 100644 --- a/src/Http/Controllers/SwaggerLumeController.php +++ b/src/Http/Controllers/SwaggerLumeController.php @@ -46,7 +46,7 @@ public function api() $response = new Response( view('swagger-lume::index', [ 'secure' => Request::secure(), - 'urlToDocs' => route('swagger-lume.docs'), + 'urlToDocs' => route('swagger-lume.docs', ['jsonFile' => config('swagger-lume.paths.docs_json')]), 'operationsSorter' => config('swagger-lume.operations_sort'), 'configUrl' => config('swagger-lume.additional_config_url'), 'validatorUrl' => config('swagger-lume.validator_url'), diff --git a/src/routes.php b/src/routes.php index 81b6898..548fb2e 100644 --- a/src/routes.php +++ b/src/routes.php @@ -1,6 +1,6 @@ get(config('swagger-lume.routes.docs'), [ +$route->get(config('swagger-lume.routes.docs').'[/{jsonFile:(?!asset).*}]', [ 'as' => 'swagger-lume.docs', 'middleware' => config('swagger-lume.routes.middleware.docs', []), 'uses' => 'Http\Controllers\SwaggerLumeController@docs',