Skip to content

Commit

Permalink
fix undefined format_to_use_for_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkaOnLine committed Feb 6, 2025
1 parent a4262f1 commit 470971c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Http/Controllers/SwaggerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public function docs(Request $request)
$fileSystem = new Filesystem();
$documentation = $request->offsetGet('documentation');
$config = $request->offsetGet('config');
$yamlFormat = (isset($config['paths']['format_to_use_for_docs']) && $config['paths']['format_to_use_for_docs'] === 'yaml');

$formatToUseForDocs = $config['paths']['format_to_use_for_docs'] ?? 'json';
$yamlFormat = ($formatToUseForDocs === 'yaml');

$filePath = sprintf(
'%s/%s',
Expand Down

0 comments on commit 470971c

Please sign in to comment.