Skip to content

Commit 0ae8b9a

Browse files
committed
feature: document title and description for openapi added
1 parent 2d60cd9 commit 0ae8b9a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

config/request-docs.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@
5656
'open_api' => [
5757
// default version that this library provides
5858
'version' => '3.0.0',
59-
// changeable
59+
// api document title
60+
'document_title' => 'Laravel Request',
61+
// api document description
62+
'document_description' => 'Laravel Request',
63+
//api document version
6064
'document_version' => '1.0.0',
6165
// license that you want to display
6266
'license' => 'Apache 2.0',

src/LaravelRequestDocsToOpenApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public function openApi(array $docs): LaravelRequestDocsToOpenApi
1414
{
1515
$this->openApi['openapi'] = config('request-docs.open_api.version', '3.0.0');
1616
$this->openApi['info']['version'] = config('request-docs.open_api.document_version', '1.0.0');
17-
$this->openApi['info']['title'] = "Laravel Request Docs";
18-
$this->openApi['info']['description'] = "Laravel Request Docs";
17+
$this->openApi['info']['title'] = config('request-docs.open_api.document_title', 'Laravel Request Docs');
18+
$this->openApi['info']['description'] = config('request-docs.open_api.document_description', 'Laravel Request Docs');
1919
$this->openApi['info']['license']['name'] = config('request-docs.open_api.license', 'Apache 2.0');
2020
$this->openApi['info']['license']['url'] = config('request-docs.open_api.license_url', 'https://www.apache.org/licenses/LICENSE-2.0.html');
2121
$this->openApi['servers'][] = [

0 commit comments

Comments
 (0)