Skip to content

Commit e7d92ee

Browse files
authored
Merge pull request #73 from RonasIT/45_ability_to_merge_docs
feat: change description of additional_paths
2 parents baa6568 + c7f6962 commit e7d92ee

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config/auto-doc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
| Paths to additional documentation
136136
|--------------------------------------------------------------------------
137137
| An array of documentation paths to merge with the main documentation.
138+
|
139+
| For example, if your additional documentation is located in storage/additional_docs/example.json
140+
| you need to add 'storage/additional_docs/example.json' to additional_paths, if your additional
141+
| documentation is located in the root directory of your project you need to add the filename to additional_paths
138142
*/
139143
'additional_paths' => [],
140144

src/Services/SwaggerService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ public function getDocFileContent()
626626
$additionalDocs = config('auto-doc.additional_paths', []);
627627

628628
foreach ($additionalDocs as $filePath) {
629-
$fileContent = json_decode(file_get_contents($filePath), true);
629+
$fileContent = json_decode(file_get_contents(base_path($filePath)), true);
630630

631631
$paths = array_keys($fileContent['paths']);
632632

0 commit comments

Comments
 (0)