Skip to content

Commit

Permalink
fix undefined format_to_use_for_docs (#632)
Browse files Browse the repository at this point in the history
* fix undefined format_to_use_for_docs

* fix undefined format_to_use_for_docs
  • Loading branch information
DarkaOnLine authored Feb 6, 2025
1 parent 77b5fa0 commit 4cf2b3f
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 = ($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 4cf2b3f

Please sign in to comment.