Skip to content

Commit

Permalink
Merge pull request #26 from verwilst/master
Browse files Browse the repository at this point in the history
Make docExpansion configurable
  • Loading branch information
DarkaOnLine authored Jul 20, 2016
2 parents 9640c48 + a615c38 commit 37d8453
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions config/l5-swagger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/Http/Controllers/SwaggerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit 37d8453

Please sign in to comment.