Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/swagger-codegen/src/main/resources/php/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down
27 changes: 18 additions & 9 deletions samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down
24 changes: 16 additions & 8 deletions samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down
24 changes: 16 additions & 8 deletions samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down Expand Up @@ -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()
);
}

Expand Down