Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
* description="API Base URL"
* )
* )
* @OA\SecurityScheme(
* securityScheme="ApiKeyAuth",
* type="apiKey",
* in="header",
* name="x-api-key"
* )
*/
class Controller extends BaseController
{
Expand Down
14 changes: 11 additions & 3 deletions config/l5-swagger.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,18 @@
* API security definitions. Will be generated into documentation file.
*/
'securityDefinitions' => [
'securitySchemes' => [],
'security' => [],
'securitySchemes' => [
'ApiKeyAuth' => [
'type' => 'apiKey',
'description' => 'Enter your API key in the header',
'name' => 'x-api-key',
'in' => 'header',
],
],
'security' => [
['ApiKeyAuth' => []],
],
],

/*
* Set this to `true` in development mode so that docs would be regenerated on each request
* Set this to `false` to disable swagger generation on production
Expand Down
Loading