generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f15fb34
commit d4b8e54
Showing
6 changed files
with
120 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Documentation config | ||
weight: 5 | ||
--- | ||
|
||
Scramble allows to customize API base URL and OpenAPI document's `info` block by publishing a config file. | ||
|
||
`info` block includes API version and API description. API description is rendered on the home page (`/docs/api`). | ||
|
||
```sh | ||
php artisan vendor:publish --provider="Dedoc\Scramble\ScrambleServiceProvider" --tag="scramble-config" | ||
``` | ||
|
||
The content of `scramble` config: | ||
|
||
```php | ||
<?php | ||
|
||
use Dedoc\Scramble\Http\Middleware\RestrictedDocsAccess; | ||
|
||
return [ | ||
/* | ||
* Your API server base URL: will be used as base URL in docs. | ||
*/ | ||
'api_base_url' => url('/api'), | ||
|
||
'info' => [ | ||
/* | ||
* API version. | ||
*/ | ||
'version' => env('API_VERSION', '0.0.1'), | ||
|
||
/* | ||
* Description rendered on the home page of the API documentation (`/docs/api`). | ||
*/ | ||
'description' => '', | ||
], | ||
|
||
'middleware' => [ | ||
'web', | ||
RestrictedDocsAccess::class, | ||
], | ||
|
||
'extensions' => [], | ||
]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters