From 3d5c48c55ced1c4d66ecf47430c9d701aaa644fd Mon Sep 17 00:00:00 2001 From: "WoutervanderLoop.nl" Date: Mon, 16 Sep 2024 13:20:09 +0200 Subject: [PATCH] Fix ClientGenerator. Refs: #48 --- src/OpenApi/ClientGenerator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenApi/ClientGenerator.php b/src/OpenApi/ClientGenerator.php index e2e1e12..cc854d5 100644 --- a/src/OpenApi/ClientGenerator.php +++ b/src/OpenApi/ClientGenerator.php @@ -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[] = '';