diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index cb143c12c07..bfab1fa8644 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -233,7 +233,7 @@ use {{invokerPackage}}\ObjectSerializer; $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('{{dataType}}' !== 'string') { + if ('{{{dataType}}}' !== 'string') { $content = json_decode($content); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index e7ae057751d..19a0faf690f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -412,7 +412,7 @@ class StoreApi $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('array<string,int>' !== 'string') { + if ('array' !== 'string') { $content = json_decode($content); } }