From 4075af994883a68c8a92ed1d58674aa3e48e8aa4 Mon Sep 17 00:00:00 2001 From: Bart Verwilst Date: Tue, 19 Jul 2016 16:40:42 +0200 Subject: [PATCH 1/4] Add docExpansion to SwaggerController.php --- src/Http/Controllers/SwaggerController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Http/Controllers/SwaggerController.php b/src/Http/Controllers/SwaggerController.php index 9571fae..29aea25 100644 --- a/src/Http/Controllers/SwaggerController.php +++ b/src/Http/Controllers/SwaggerController.php @@ -70,6 +70,7 @@ public function api() 'secure' => Request::secure(), 'urlToDocs' => route('l5-swagger.docs', config('l5-swagger.paths.docs_json', 'api-docs.json')), 'requestHeaders' => config('l5-swagger.headers.request'), + 'docExpansion' => config('l5-swagger.docExpansion') ], $extras), 200 ); From 9a4b1254d78293cb51c49a37d7ff50ea773789ef Mon Sep 17 00:00:00 2001 From: Bart Verwilst Date: Tue, 19 Jul 2016 16:42:20 +0200 Subject: [PATCH 2/4] Add docExpansion to l5-swagger.php --- config/l5-swagger.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/l5-swagger.php b/config/l5-swagger.php index 691e644..7cfb0fe 100644 --- a/config/l5-swagger.php +++ b/config/l5-swagger.php @@ -174,6 +174,14 @@ 'proxy' => false, + /* + |-------------------------------------------------------------------------- + | Edit to change layout of GUI ( 'none', 'list' or 'full') + |-------------------------------------------------------------------------- + */ + + 'docExpansion' => env('L5_SWAGGER_DOC_EXPANSION', 'none'), + /* |-------------------------------------------------------------------------- | Uncomment to pass the validatorUrl parameter to SwaggerUi init on the JS From 446656d9cbe75598f7dfefda6cb44e9277284601 Mon Sep 17 00:00:00 2001 From: Bart Verwilst Date: Tue, 19 Jul 2016 16:43:22 +0200 Subject: [PATCH 3/4] Set docExpansion in index.blade.php --- resources/views/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 0100422..985be3d 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -89,7 +89,7 @@ onFailure: function(data) { console.log("Unable to Load SwaggerUI"); }, - docExpansion: "none", + docExpansion: {!! isset($docExpansion) ? '"' . $docExpansion . '"' : '"none"' !!}, jsonEditor: false, apisSorter: "alpha", defaultModelRendering: 'schema', From a615c386db0a73d3ee529f0109483b629f210880 Mon Sep 17 00:00:00 2001 From: Bart Verwilst Date: Tue, 19 Jul 2016 16:49:35 +0200 Subject: [PATCH 4/4] Update SwaggerController.php --- src/Http/Controllers/SwaggerController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/SwaggerController.php b/src/Http/Controllers/SwaggerController.php index 29aea25..7cfa6a1 100644 --- a/src/Http/Controllers/SwaggerController.php +++ b/src/Http/Controllers/SwaggerController.php @@ -70,7 +70,7 @@ public function api() 'secure' => Request::secure(), 'urlToDocs' => route('l5-swagger.docs', config('l5-swagger.paths.docs_json', 'api-docs.json')), 'requestHeaders' => config('l5-swagger.headers.request'), - 'docExpansion' => config('l5-swagger.docExpansion') + 'docExpansion' => config('l5-swagger.docExpansion'), ], $extras), 200 );