L5Swagger\Http\Controllers\SwaggerController::docs PHP Method

docs() public method

Dump api-docs.json content endpoint.
public docs ( string $jsonFile = null ) : Response
$jsonFile string
return Response
    public function docs($jsonFile = null)
    {
        $filePath = config('l5-swagger.paths.docs') . '/' . (!is_null($jsonFile) ? $jsonFile : config('l5-swagger.paths.docs_json', 'api-docs.json'));
        if (File::extension($filePath) === '') {
            $filePath .= '.json';
        }
        if (!File::exists($filePath)) {
            abort(404, 'Cannot find ' . $filePath);
        }
        $content = File::get($filePath);
        return Response::make($content, 200, ['Content-Type' => 'application/json']);
    }
SwaggerController