diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index 2ef85004c4b..5fffd0de57f 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -130,7 +130,8 @@ use {{invokerPackage}}\ObjectSerializer; throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md index 845ab2f8a02..5a5bd8c3bda 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md @@ -257,10 +257,10 @@ Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERN Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\FakeApi(new \Http\Adapter\Guzzle6\Client()); -$number = 3.4; // float | None +$number = 8.14; // float | None $double = 1.2; // double | None $pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None -$byte = "byte_example"; // string | None +$byte = "B"; // string | None $integer = 56; // int | None $int32 = 56; // int | None $int64 = 789; // int | None diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php index a56487fc062..0e50667dc0c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php @@ -122,7 +122,8 @@ public function testSpecialTagsWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php index 4df01fca503..b712667cbf3 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php @@ -118,7 +118,8 @@ public function fakeOuterBooleanSerializeWithHttpInfo($body = null) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -364,7 +365,8 @@ public function fakeOuterCompositeSerializeWithHttpInfo($body = null) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -610,7 +612,8 @@ public function fakeOuterNumberSerializeWithHttpInfo($body = null) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -856,7 +859,8 @@ public function fakeOuterStringSerializeWithHttpInfo($body = null) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1106,7 +1110,8 @@ public function testClientModelWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1387,7 +1392,8 @@ public function testEndpointParametersWithHttpInfo($number, $double, $pattern_wi throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1781,7 +1787,8 @@ public function testEnumParametersWithHttpInfo($enum_form_string_array = null, $ throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -2050,7 +2057,8 @@ public function testInlineAdditionalPropertiesWithHttpInfo($param) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -2271,7 +2279,8 @@ public function testJsonFormDataWithHttpInfo($param, $param2) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php index 62105818963..2ef04d3951f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php @@ -122,7 +122,8 @@ public function testClassnameWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index 80f41fdf971..4c7f7845d04 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -121,7 +121,8 @@ public function addPetWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -346,7 +347,8 @@ public function deletePetWithHttpInfo($pet_id, $api_key = null) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -582,7 +584,8 @@ public function findPetsByStatusWithHttpInfo($status) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -846,7 +849,8 @@ public function findPetsByTagsWithHttpInfo($tags) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1110,7 +1114,8 @@ public function getPetByIdWithHttpInfo($pet_id) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1375,7 +1380,8 @@ public function updatePetWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1602,7 +1608,8 @@ public function updatePetWithFormWithHttpInfo($pet_id, $name = null, $status = n throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1849,7 +1856,8 @@ public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $fi throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index 175f939a7e6..5026eecfd74 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -121,7 +121,8 @@ public function deleteOrderWithHttpInfo($order_id) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -344,7 +345,8 @@ public function getInventoryWithHttpInfo() throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -593,7 +595,8 @@ public function getOrderByIdWithHttpInfo($order_id) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -861,7 +864,8 @@ public function placeOrderWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index 523da183ae6..b9d0a3e3f28 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -121,7 +121,8 @@ public function createUserWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -340,7 +341,8 @@ public function createUsersWithArrayInputWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -559,7 +561,8 @@ public function createUsersWithListInputWithHttpInfo($body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -778,7 +781,8 @@ public function deleteUserWithHttpInfo($username) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1003,7 +1007,8 @@ public function getUserByNameWithHttpInfo($username) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1266,7 +1271,8 @@ public function loginUserWithHttpInfo($username, $password) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1533,7 +1539,8 @@ public function logoutUserWithHttpInfo() throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); } @@ -1742,7 +1749,8 @@ public function updateUserWithHttpInfo($username, $body) throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse()->getBody()->getContents() ); }