Skip to content

Commit 4cf2b3f

Browse files
authored
fix undefined format_to_use_for_docs (#632)
* fix undefined format_to_use_for_docs * fix undefined format_to_use_for_docs
1 parent 77b5fa0 commit 4cf2b3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Http/Controllers/SwaggerController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public function docs(Request $request)
4040
$fileSystem = new Filesystem();
4141
$documentation = $request->offsetGet('documentation');
4242
$config = $request->offsetGet('config');
43-
$yamlFormat = ($config['paths']['format_to_use_for_docs'] === 'yaml');
43+
44+
$formatToUseForDocs = $config['paths']['format_to_use_for_docs'] ?? 'json';
45+
$yamlFormat = ($formatToUseForDocs === 'yaml');
4446

4547
$filePath = sprintf(
4648
'%s/%s',

0 commit comments

Comments
 (0)