diff --git a/src/config/config.php b/src/config/config.php index 9f404cf..8f85372 100755 --- a/src/config/config.php +++ b/src/config/config.php @@ -11,7 +11,7 @@ 'default-api-version' => null, 'default-swagger-version' => null, 'api-doc-template' => null, - 'suffix' => '.{format}', +// 'suffix' => '.{format}', 'title' => 'Swagger UI' ); \ No newline at end of file diff --git a/src/controllers/SwaggerController.php b/src/controllers/SwaggerController.php index 884786e..53cd75e 100755 --- a/src/controllers/SwaggerController.php +++ b/src/controllers/SwaggerController.php @@ -17,7 +17,7 @@ public function getIndex() $swagger->paths = config('latrell-swagger.paths'); $swagger->exclude = config('latrell-swagger.exclude'); $swagger->output = config('latrell-swagger.output'); - $swagger->suffix = config('latrell-swagger.suffix'); + $swagger->suffix = ""; $swagger->default_api_version = config('latrell-swagger.default-api-version'); $swagger->default_swagger_version = config('latrell-swagger.default-swagger-version'); $swagger->api_doc_template = config('latrell-swagger.api-doc-template'); @@ -32,8 +32,9 @@ public function getIndex() return view('latrell/swagger::index'); } - public function getDocs($page = 'api-docs.json') + public function getDocs($page = 'api-docs') { + $page = $page . '.json'; $path = head((array) config('latrell-swagger.output')) . DIRECTORY_SEPARATOR . $page; if (! file_exists($path)) { App::abort(404);