Skip to content

Commit

Permalink
Fix ClientGenerator. Refs: #48
Browse files Browse the repository at this point in the history
  • Loading branch information
WoutervanderLoopNL committed Sep 16, 2024
1 parent c38d156 commit 3d5c48c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OpenApi/ClientGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ protected function generateMethod(string $path, string $httpMethod, array &$code
$code[] = sprintf(' \'consumes\' => \'%s\',', array_key_first($methodDefinition['requestBody']['content']));
}

$code[] = ' ];';
$options = '$options';

$acceptLanguage = $this->findMethodDefinitionParameter($methodDefinition, 'Accept-Language');

if ($acceptLanguage !== null) {
$code[] = sprintf(' \'language\' => %s,', '$AcceptLanguage');
}

$code[] = ' ];';
$options = '$options';

$this->addResponseTypes($methodDefinition['responses'], $code);

$code[] = '';
Expand Down

0 comments on commit 3d5c48c

Please sign in to comment.