add debug switch to print out downloaded file info

This commit is contained in:
wing328 2016-05-14 17:11:48 +08:00
parent 1939ce8e91
commit 0b7d0c34af
23 changed files with 468 additions and 364 deletions

View File

@ -268,7 +268,11 @@ class ObjectSerializer
}
$deserialized = new \SplFileObject($filename, "w");
$byte_written = $deserialized->fwrite($data);
error_log("[INFO] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
if (Configuration::getDefaultConfiguration()->getDebug()) {
error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
}
return $deserialized;
} else {

View File

@ -1,11 +1,11 @@
# SwaggerClient-php
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-05-10T22:37:00.768+08:00
- Package version:
- Build date: 2016-05-14T17:06:01.056+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
@ -87,48 +87,48 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FakeApi* | [**testEndpointParameters**](docs/ApiFakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*PetApi* | [**addPet**](docs/ApiPetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](docs/ApiPetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/ApiPetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](docs/ApiPetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](docs/ApiPetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**updatePet**](docs/ApiPetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/ApiPetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/ApiPetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs/ApiStoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs/ApiStoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](docs/ApiStoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/ApiStoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/ApiUserApi.md#createuser) | **POST** /user | Create user
*UserApi* | [**createUsersWithArrayInput**](docs/ApiUserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**createUsersWithListInput**](docs/ApiUserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
*UserApi* | [**deleteUser**](docs/ApiUserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
*UserApi* | [**getUserByName**](docs/ApiUserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
*UserApi* | [**loginUser**](docs/ApiUserApi.md#loginuser) | **GET** /user/login | Logs user into the system
*UserApi* | [**logoutUser**](docs/ApiUserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**updateUser**](docs/ApiUserApi.md#updateuser) | **PUT** /user/{username} | Updated user
*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](docs/Api/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/Api/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](docs/Api/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](docs/Api/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/Api/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/Api/UserApi.md#createuser) | **POST** /user | Create user
*UserApi* | [**createUsersWithArrayInput**](docs/Api/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**createUsersWithListInput**](docs/Api/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
*UserApi* | [**deleteUser**](docs/Api/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
*UserApi* | [**getUserByName**](docs/Api/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
*UserApi* | [**loginUser**](docs/Api/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
*UserApi* | [**logoutUser**](docs/Api/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**updateUser**](docs/Api/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
## Documentation For Models
- [Animal](docs/ModelAnimal.md)
- [AnimalFarm](docs/ModelAnimalFarm.md)
- [ApiResponse](docs/ModelApiResponse.md)
- [Cat](docs/ModelCat.md)
- [Category](docs/ModelCategory.md)
- [Dog](docs/ModelDog.md)
- [EnumClass](docs/ModelEnumClass.md)
- [EnumTest](docs/ModelEnumTest.md)
- [FormatTest](docs/ModelFormatTest.md)
- [Model200Response](docs/ModelModel200Response.md)
- [ModelReturn](docs/ModelModelReturn.md)
- [Name](docs/ModelName.md)
- [Order](docs/ModelOrder.md)
- [Pet](docs/ModelPet.md)
- [SpecialModelName](docs/ModelSpecialModelName.md)
- [Tag](docs/ModelTag.md)
- [User](docs/ModelUser.md)
- [Animal](docs/Model/Animal.md)
- [AnimalFarm](docs/Model/AnimalFarm.md)
- [ApiResponse](docs/Model/ApiResponse.md)
- [Cat](docs/Model/Cat.md)
- [Category](docs/Model/Category.md)
- [Dog](docs/Model/Dog.md)
- [EnumClass](docs/Model/EnumClass.md)
- [EnumTest](docs/Model/EnumTest.md)
- [FormatTest](docs/Model/FormatTest.md)
- [Model200Response](docs/Model/Model200Response.md)
- [ModelReturn](docs/Model/ModelReturn.md)
- [Name](docs/Model/Name.md)
- [Order](docs/Model/Order.md)
- [Pet](docs/Model/Pet.md)
- [SpecialModelName](docs/Model/SpecialModelName.md)
- [Tag](docs/Model/Tag.md)
- [User](docs/Model/User.md)
## Documentation For Authorization

View File

@ -9,6 +9,7 @@
* new \Swagger\Client\Baz\Qux;
*
* @param string $class The fully-qualified class name.
*
* @return void
*/
spl_autoload_register(function ($class) {

View File

@ -1,6 +1,5 @@
{
"name": "GIT_USER_ID/GIT_REPO_ID",
"version": "1.0.0",
"description": "",
"keywords": [
"swagger",

View File

@ -71,5 +71,5 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

View File

@ -44,7 +44,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store |
**body** | [**\Swagger\Client\Model\Pet**](../Model/\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -52,14 +52,14 @@ void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **deletePet**
> deletePet($pet_id, $api_key)
@ -101,14 +101,14 @@ void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **findPetsByStatus**
> \Swagger\Client\Model\Pet[] findPetsByStatus($status)
@ -141,22 +141,22 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**string[]**](string.md)| Status values that need to be considered for filter |
**status** | [**string[]**](../Model/string.md)| Status values that need to be considered for filter |
### Return type
[**\Swagger\Client\Model\Pet[]**](Pet.md)
[**\Swagger\Client\Model\Pet[]**](../Model/Pet.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **findPetsByTags**
> \Swagger\Client\Model\Pet[] findPetsByTags($tags)
@ -189,22 +189,22 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**string[]**](string.md)| Tags to filter by |
**tags** | [**string[]**](../Model/string.md)| Tags to filter by |
### Return type
[**\Swagger\Client\Model\Pet[]**](Pet.md)
[**\Swagger\Client\Model\Pet[]**](../Model/Pet.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getPetById**
> \Swagger\Client\Model\Pet getPetById($pet_id)
@ -243,18 +243,18 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\Pet**](Pet.md)
[**\Swagger\Client\Model\Pet**](../Model/Pet.md)
### Authorization
[api_key](../README.md#api_key)
[api_key](../../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **updatePet**
> updatePet($body)
@ -286,7 +286,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store |
**body** | [**\Swagger\Client\Model\Pet**](../Model/\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -294,14 +294,14 @@ void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **updatePetWithForm**
> updatePetWithForm($pet_id, $name, $status)
@ -345,14 +345,14 @@ void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **uploadFile**
> \Swagger\Client\Model\ApiResponse uploadFile($pet_id, $additional_metadata, $file)
@ -393,16 +393,16 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\ApiResponse**](ApiResponse.md)
[**\Swagger\Client\Model\ApiResponse**](../Model/ApiResponse.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
[petstore_auth](../../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

View File

@ -52,7 +52,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getInventory**
> map[string,int] getInventory()
@ -87,18 +87,18 @@ This endpoint does not need any parameter.
### Return type
[**map[string,int]**](map.md)
[**map[string,int]**](../Model/map.md)
### Authorization
[api_key](../README.md#api_key)
[api_key](../../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getOrderById**
> \Swagger\Client\Model\Order getOrderById($order_id)
@ -132,7 +132,7 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\Order**](Order.md)
[**\Swagger\Client\Model\Order**](../Model/Order.md)
### Authorization
@ -143,7 +143,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **placeOrder**
> \Swagger\Client\Model\Order placeOrder($body)
@ -173,11 +173,11 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Order**](\Swagger\Client\Model\Order.md)| order placed for purchasing the pet |
**body** | [**\Swagger\Client\Model\Order**](../Model/\Swagger\Client\Model\Order.md)| order placed for purchasing the pet |
### Return type
[**\Swagger\Client\Model\Order**](Order.md)
[**\Swagger\Client\Model\Order**](../Model/Order.md)
### Authorization
@ -188,5 +188,5 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

View File

@ -41,7 +41,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User**](\Swagger\Client\Model\User.md)| Created user object |
**body** | [**\Swagger\Client\Model\User**](../Model/\Swagger\Client\Model\User.md)| Created user object |
### Return type
@ -56,7 +56,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **createUsersWithArrayInput**
> createUsersWithArrayInput($body)
@ -85,7 +85,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User[]**](User.md)| List of user object |
**body** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object |
### Return type
@ -100,7 +100,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **createUsersWithListInput**
> createUsersWithListInput($body)
@ -129,7 +129,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User[]**](User.md)| List of user object |
**body** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object |
### Return type
@ -144,7 +144,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **deleteUser**
> deleteUser($username)
@ -188,7 +188,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getUserByName**
> \Swagger\Client\Model\User getUserByName($username)
@ -222,7 +222,7 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\User**](User.md)
[**\Swagger\Client\Model\User**](../Model/User.md)
### Authorization
@ -233,7 +233,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **loginUser**
> string loginUser($username, $password)
@ -280,7 +280,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **logoutUser**
> logoutUser()
@ -320,7 +320,7 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **updateUser**
> updateUser($username, $body)
@ -351,7 +351,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**body** | [**\Swagger\Client\Model\User**](\Swagger\Client\Model\User.md)| Updated user object |
**body** | [**\Swagger\Client\Model\User**](../Model/\Swagger\Client\Model\User.md)| Updated user object |
### Return type
@ -366,5 +366,5 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

View File

@ -52,12 +52,14 @@ class FakeApi
/**
* API Client
*
* @var \Swagger\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
*
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct(\Swagger\Client\ApiClient $apiClient = null)
@ -72,6 +74,7 @@ class FakeApi
/**
* Get API client
*
* @return \Swagger\Client\ApiClient get the API client
*/
public function getApiClient()
@ -81,7 +84,9 @@ class FakeApi
/**
* Set the API client
*
* @param \Swagger\Client\ApiClient $apiClient set the API client
*
* @return FakeApi
*/
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
@ -91,7 +96,7 @@ class FakeApi
}
/**
* testEndpointParameters
* Operation testEndpointParameters
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
@ -107,18 +112,19 @@ class FakeApi
* @param \DateTime $date None (optional)
* @param \DateTime $date_time None (optional)
* @param string $password None (optional)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function testEndpointParameters($number, $double, $string, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $binary = null, $date = null, $date_time = null, $password = null)
{
list($response) = $this->testEndpointParametersWithHttpInfo ($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
list($response) = $this->testEndpointParametersWithHttpInfo($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
return $response;
}
/**
* testEndpointParametersWithHttpInfo
* Operation testEndpointParametersWithHttpInfo
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
@ -134,6 +140,7 @@ class FakeApi
* @param \DateTime $date None (optional)
* @param \DateTime $date_time None (optional)
* @param string $password None (optional)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/

View File

@ -52,12 +52,14 @@ class PetApi
/**
* API Client
*
* @var \Swagger\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
*
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct(\Swagger\Client\ApiClient $apiClient = null)
@ -72,6 +74,7 @@ class PetApi
/**
* Get API client
*
* @return \Swagger\Client\ApiClient get the API client
*/
public function getApiClient()
@ -81,7 +84,9 @@ class PetApi
/**
* Set the API client
*
* @param \Swagger\Client\ApiClient $apiClient set the API client
*
* @return PetApi
*/
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
@ -91,27 +96,29 @@ class PetApi
}
/**
* addPet
* Operation addPet
*
* Add a new pet to the store
*
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function addPet($body)
{
list($response) = $this->addPetWithHttpInfo ($body);
list($response) = $this->addPetWithHttpInfo($body);
return $response;
}
/**
* addPetWithHttpInfo
* Operation addPetWithHttpInfo
*
* Add a new pet to the store
*
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -176,29 +183,31 @@ class PetApi
}
}
/**
* deletePet
* Operation deletePet
*
* Deletes a pet
*
* @param int $pet_id Pet id to delete (required)
* @param string $api_key (optional)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function deletePet($pet_id, $api_key = null)
{
list($response) = $this->deletePetWithHttpInfo ($pet_id, $api_key);
list($response) = $this->deletePetWithHttpInfo($pet_id, $api_key);
return $response;
}
/**
* deletePetWithHttpInfo
* Operation deletePetWithHttpInfo
*
* Deletes a pet
*
* @param int $pet_id Pet id to delete (required)
* @param string $api_key (optional)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -269,27 +278,29 @@ class PetApi
}
}
/**
* findPetsByStatus
* Operation findPetsByStatus
*
* Finds Pets by status
*
* @param string[] $status Status values that need to be considered for filter (required)
*
* @return \Swagger\Client\Model\Pet[]
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function findPetsByStatus($status)
{
list($response) = $this->findPetsByStatusWithHttpInfo ($status);
list($response) = $this->findPetsByStatusWithHttpInfo($status);
return $response;
}
/**
* findPetsByStatusWithHttpInfo
* Operation findPetsByStatusWithHttpInfo
*
* Finds Pets by status
*
* @param string[] $status Status values that need to be considered for filter (required)
*
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -363,27 +374,29 @@ class PetApi
}
}
/**
* findPetsByTags
* Operation findPetsByTags
*
* Finds Pets by tags
*
* @param string[] $tags Tags to filter by (required)
*
* @return \Swagger\Client\Model\Pet[]
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function findPetsByTags($tags)
{
list($response) = $this->findPetsByTagsWithHttpInfo ($tags);
list($response) = $this->findPetsByTagsWithHttpInfo($tags);
return $response;
}
/**
* findPetsByTagsWithHttpInfo
* Operation findPetsByTagsWithHttpInfo
*
* Finds Pets by tags
*
* @param string[] $tags Tags to filter by (required)
*
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -457,27 +470,29 @@ class PetApi
}
}
/**
* getPetById
* Operation getPetById
*
* Find pet by ID
*
* @param int $pet_id ID of pet to return (required)
*
* @return \Swagger\Client\Model\Pet
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function getPetById($pet_id)
{
list($response) = $this->getPetByIdWithHttpInfo ($pet_id);
list($response) = $this->getPetByIdWithHttpInfo($pet_id);
return $response;
}
/**
* getPetByIdWithHttpInfo
* Operation getPetByIdWithHttpInfo
*
* Find pet by ID
*
* @param int $pet_id ID of pet to return (required)
*
* @return Array of \Swagger\Client\Model\Pet, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -554,27 +569,29 @@ class PetApi
}
}
/**
* updatePet
* Operation updatePet
*
* Update an existing pet
*
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function updatePet($body)
{
list($response) = $this->updatePetWithHttpInfo ($body);
list($response) = $this->updatePetWithHttpInfo($body);
return $response;
}
/**
* updatePetWithHttpInfo
* Operation updatePetWithHttpInfo
*
* Update an existing pet
*
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -639,31 +656,33 @@ class PetApi
}
}
/**
* updatePetWithForm
* Operation updatePetWithForm
*
* Updates a pet in the store with form data
*
* @param int $pet_id ID of pet that needs to be updated (required)
* @param string $name Updated name of the pet (optional)
* @param string $status Updated status of the pet (optional)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function updatePetWithForm($pet_id, $name = null, $status = null)
{
list($response) = $this->updatePetWithFormWithHttpInfo ($pet_id, $name, $status);
list($response) = $this->updatePetWithFormWithHttpInfo($pet_id, $name, $status);
return $response;
}
/**
* updatePetWithFormWithHttpInfo
* Operation updatePetWithFormWithHttpInfo
*
* Updates a pet in the store with form data
*
* @param int $pet_id ID of pet that needs to be updated (required)
* @param string $name Updated name of the pet (optional)
* @param string $status Updated status of the pet (optional)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -737,31 +756,33 @@ class PetApi
}
}
/**
* uploadFile
* Operation uploadFile
*
* uploads an image
*
* @param int $pet_id ID of pet to update (required)
* @param string $additional_metadata Additional data to pass to server (optional)
* @param \SplFileObject $file file to upload (optional)
*
* @return \Swagger\Client\Model\ApiResponse
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function uploadFile($pet_id, $additional_metadata = null, $file = null)
{
list($response) = $this->uploadFileWithHttpInfo ($pet_id, $additional_metadata, $file);
list($response) = $this->uploadFileWithHttpInfo($pet_id, $additional_metadata, $file);
return $response;
}
/**
* uploadFileWithHttpInfo
* Operation uploadFileWithHttpInfo
*
* uploads an image
*
* @param int $pet_id ID of pet to update (required)
* @param string $additional_metadata Additional data to pass to server (optional)
* @param \SplFileObject $file file to upload (optional)
*
* @return Array of \Swagger\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/

View File

@ -52,12 +52,14 @@ class StoreApi
/**
* API Client
*
* @var \Swagger\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
*
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct(\Swagger\Client\ApiClient $apiClient = null)
@ -72,6 +74,7 @@ class StoreApi
/**
* Get API client
*
* @return \Swagger\Client\ApiClient get the API client
*/
public function getApiClient()
@ -81,7 +84,9 @@ class StoreApi
/**
* Set the API client
*
* @param \Swagger\Client\ApiClient $apiClient set the API client
*
* @return StoreApi
*/
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
@ -91,27 +96,29 @@ class StoreApi
}
/**
* deleteOrder
* Operation deleteOrder
*
* Delete purchase order by ID
*
* @param string $order_id ID of the order that needs to be deleted (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function deleteOrder($order_id)
{
list($response) = $this->deleteOrderWithHttpInfo ($order_id);
list($response) = $this->deleteOrderWithHttpInfo($order_id);
return $response;
}
/**
* deleteOrderWithHttpInfo
* Operation deleteOrderWithHttpInfo
*
* Delete purchase order by ID
*
* @param string $order_id ID of the order that needs to be deleted (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -178,25 +185,27 @@ class StoreApi
}
}
/**
* getInventory
* Operation getInventory
*
* Returns pet inventories by status
*
*
* @return map[string,int]
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function getInventory()
{
list($response) = $this->getInventoryWithHttpInfo ();
list($response) = $this->getInventoryWithHttpInfo();
return $response;
}
/**
* getInventoryWithHttpInfo
* Operation getInventoryWithHttpInfo
*
* Returns pet inventories by status
*
*
* @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -261,27 +270,29 @@ class StoreApi
}
}
/**
* getOrderById
* Operation getOrderById
*
* Find purchase order by ID
*
* @param int $order_id ID of pet that needs to be fetched (required)
*
* @return \Swagger\Client\Model\Order
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function getOrderById($order_id)
{
list($response) = $this->getOrderByIdWithHttpInfo ($order_id);
list($response) = $this->getOrderByIdWithHttpInfo($order_id);
return $response;
}
/**
* getOrderByIdWithHttpInfo
* Operation getOrderByIdWithHttpInfo
*
* Find purchase order by ID
*
* @param int $order_id ID of pet that needs to be fetched (required)
*
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -358,27 +369,29 @@ class StoreApi
}
}
/**
* placeOrder
* Operation placeOrder
*
* Place an order for a pet
*
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
*
* @return \Swagger\Client\Model\Order
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function placeOrder($body)
{
list($response) = $this->placeOrderWithHttpInfo ($body);
list($response) = $this->placeOrderWithHttpInfo($body);
return $response;
}
/**
* placeOrderWithHttpInfo
* Operation placeOrderWithHttpInfo
*
* Place an order for a pet
*
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
*
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/

View File

@ -52,12 +52,14 @@ class UserApi
/**
* API Client
*
* @var \Swagger\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
*
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct(\Swagger\Client\ApiClient $apiClient = null)
@ -72,6 +74,7 @@ class UserApi
/**
* Get API client
*
* @return \Swagger\Client\ApiClient get the API client
*/
public function getApiClient()
@ -81,7 +84,9 @@ class UserApi
/**
* Set the API client
*
* @param \Swagger\Client\ApiClient $apiClient set the API client
*
* @return UserApi
*/
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
@ -91,27 +96,29 @@ class UserApi
}
/**
* createUser
* Operation createUser
*
* Create user
*
* @param \Swagger\Client\Model\User $body Created user object (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function createUser($body)
{
list($response) = $this->createUserWithHttpInfo ($body);
list($response) = $this->createUserWithHttpInfo($body);
return $response;
}
/**
* createUserWithHttpInfo
* Operation createUserWithHttpInfo
*
* Create user
*
* @param \Swagger\Client\Model\User $body Created user object (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -171,27 +178,29 @@ class UserApi
}
}
/**
* createUsersWithArrayInput
* Operation createUsersWithArrayInput
*
* Creates list of users with given input array
*
* @param \Swagger\Client\Model\User[] $body List of user object (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function createUsersWithArrayInput($body)
{
list($response) = $this->createUsersWithArrayInputWithHttpInfo ($body);
list($response) = $this->createUsersWithArrayInputWithHttpInfo($body);
return $response;
}
/**
* createUsersWithArrayInputWithHttpInfo
* Operation createUsersWithArrayInputWithHttpInfo
*
* Creates list of users with given input array
*
* @param \Swagger\Client\Model\User[] $body List of user object (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -251,27 +260,29 @@ class UserApi
}
}
/**
* createUsersWithListInput
* Operation createUsersWithListInput
*
* Creates list of users with given input array
*
* @param \Swagger\Client\Model\User[] $body List of user object (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function createUsersWithListInput($body)
{
list($response) = $this->createUsersWithListInputWithHttpInfo ($body);
list($response) = $this->createUsersWithListInputWithHttpInfo($body);
return $response;
}
/**
* createUsersWithListInputWithHttpInfo
* Operation createUsersWithListInputWithHttpInfo
*
* Creates list of users with given input array
*
* @param \Swagger\Client\Model\User[] $body List of user object (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -331,27 +342,29 @@ class UserApi
}
}
/**
* deleteUser
* Operation deleteUser
*
* Delete user
*
* @param string $username The name that needs to be deleted (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function deleteUser($username)
{
list($response) = $this->deleteUserWithHttpInfo ($username);
list($response) = $this->deleteUserWithHttpInfo($username);
return $response;
}
/**
* deleteUserWithHttpInfo
* Operation deleteUserWithHttpInfo
*
* Delete user
*
* @param string $username The name that needs to be deleted (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -414,27 +427,29 @@ class UserApi
}
}
/**
* getUserByName
* Operation getUserByName
*
* Get user by user name
*
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
*
* @return \Swagger\Client\Model\User
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function getUserByName($username)
{
list($response) = $this->getUserByNameWithHttpInfo ($username);
list($response) = $this->getUserByNameWithHttpInfo($username);
return $response;
}
/**
* getUserByNameWithHttpInfo
* Operation getUserByNameWithHttpInfo
*
* Get user by user name
*
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
*
* @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -504,29 +519,31 @@ class UserApi
}
}
/**
* loginUser
* Operation loginUser
*
* Logs user into the system
*
* @param string $username The user name for login (required)
* @param string $password The password for login in clear text (required)
*
* @return string
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function loginUser($username, $password)
{
list($response) = $this->loginUserWithHttpInfo ($username, $password);
list($response) = $this->loginUserWithHttpInfo($username, $password);
return $response;
}
/**
* loginUserWithHttpInfo
* Operation loginUserWithHttpInfo
*
* Logs user into the system
*
* @param string $username The user name for login (required)
* @param string $password The password for login in clear text (required)
*
* @return Array of string, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -600,25 +617,27 @@ class UserApi
}
}
/**
* logoutUser
* Operation logoutUser
*
* Logs out current logged in user session
*
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function logoutUser()
{
list($response) = $this->logoutUserWithHttpInfo ();
list($response) = $this->logoutUserWithHttpInfo();
return $response;
}
/**
* logoutUserWithHttpInfo
* Operation logoutUserWithHttpInfo
*
* Logs out current logged in user session
*
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -669,29 +688,31 @@ class UserApi
}
}
/**
* updateUser
* Operation updateUser
*
* Updated user
*
* @param string $username name that need to be deleted (required)
* @param \Swagger\Client\Model\User $body Updated user object (required)
*
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function updateUser($username, $body)
{
list($response) = $this->updateUserWithHttpInfo ($username, $body);
list($response) = $this->updateUserWithHttpInfo($username, $body);
return $response;
}
/**
* updateUserWithHttpInfo
* Operation updateUserWithHttpInfo
*
* Updated user
*
* @param string $username name that need to be deleted (required)
* @param \Swagger\Client\Model\User $body Updated user object (required)
*
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/

View File

@ -55,18 +55,21 @@ class ApiClient
/**
* Configuration
*
* @var Configuration
*/
protected $config;
/**
* Object Serializer
*
* @var ObjectSerializer
*/
protected $serializer;
/**
* Constructor of the class
*
* @param Configuration $config config for this ApiClient
*/
public function __construct(\Swagger\Client\Configuration $config = null)
@ -81,6 +84,7 @@ class ApiClient
/**
* Get the config
*
* @return Configuration
*/
public function getConfig()
@ -90,6 +94,7 @@ class ApiClient
/**
* Get the serializer
*
* @return ObjectSerializer
*/
public function getSerializer()
@ -99,7 +104,9 @@ class ApiClient
/**
* Get API key (with prefix if set)
*
* @param string $apiKeyIdentifier name of apikey
*
* @return string API key with the prefix
*/
public function getApiKeyWithPrefix($apiKeyIdentifier)
@ -122,12 +129,14 @@ class ApiClient
/**
* Make the HTTP call (Sync)
*
* @param string $resourcePath path to method endpoint
* @param string $method method to call
* @param array $queryParams parameters to be place in query URL
* @param array $postData parameters to be placed in POST body
* @param array $headerParams parameters to be place in request header
* @param string $responseType expected response type of the endpoint
*
* @throws \Swagger\Client\ApiException on a non 2xx response
* @return mixed
*/
@ -171,7 +180,7 @@ class ApiClient
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if (! empty($queryParams)) {
if (!empty($queryParams)) {
$url = ($url . '?' . http_build_query($queryParams));
}
@ -216,7 +225,7 @@ class ApiClient
// Make the request
$response = curl_exec($curl);
$http_header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
$http_header = $this->http_parse_headers(substr($response, 0, $http_header_size));
$http_header = $this->httpParseHeaders(substr($response, 0, $http_header_size));
$http_body = substr($response, $http_header_size);
$response_info = curl_getinfo($curl);
@ -295,7 +304,7 @@ class ApiClient
*
* @return string[] Array of HTTP response heaers
*/
protected function http_parse_headers($raw_headers)
protected function httpParseHeaders($raw_headers)
{
// ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986
$headers = array();

View File

@ -48,24 +48,28 @@ class ApiException extends Exception
/**
* The HTTP body of the server response either as Json or string.
*
* @var mixed
*/
protected $responseBody;
/**
* The HTTP header of the server response.
*
* @var string[]
*/
protected $responseHeaders;
/**
* The deserialized response object
*
* @var $responseObject;
*/
protected $responseObject;
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string $responseHeaders HTTP response header
@ -100,7 +104,9 @@ class ApiException extends Exception
/**
* Sets the deseralized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
* @return void
*/
public function setResponseObject($obj)

View File

@ -110,7 +110,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = "Swagger-Codegen/1.0.0/php";
protected $userAgent = "Swagger-Codegen//php";
/**
* Debug switch (default set to false)
@ -517,7 +517,7 @@ class Configuration
$report .= " OS: ".php_uname()."\n";
$report .= " PHP Version: ".phpversion()."\n";
$report .= " OpenAPI Spec Version: 1.0.0\n";
$report .= " SDK Package Version: 1.0.0\n";
$report .= " SDK Package Version: \n";
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
return $report;

View File

@ -125,7 +125,7 @@ class AnimalFarm implements ArrayAccess
*
* @return array invalid properties with reasons
*/
public function list_invalid_properties()
public function listInvalidProperties()
{
$invalid_properties = array();
return $invalid_properties;

View File

@ -125,7 +125,7 @@ class EnumClass implements ArrayAccess
*
* @return array invalid properties with reasons
*/
public function list_invalid_properties()
public function listInvalidProperties()
{
$invalid_properties = array();
return $invalid_properties;

View File

@ -110,6 +110,12 @@ class EnumTest implements ArrayAccess
return self::$getters;
}
const ENUM_STRING_UPPER = 'UPPER';
const ENUM_STRING_LOWER = 'lower';
const ENUM_INTEGER_1 = 1;
const ENUM_INTEGER_MINUS_1 = -1;
const ENUM_NUMBER_1_DOT_1 = 1.1;
const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2;
@ -120,7 +126,8 @@ class EnumTest implements ArrayAccess
public function getEnumStringAllowableValues()
{
return [
self::ENUM_STRING_UPPER,
self::ENUM_STRING_LOWER,
];
}
@ -131,7 +138,8 @@ class EnumTest implements ArrayAccess
public function getEnumIntegerAllowableValues()
{
return [
self::ENUM_INTEGER_1,
self::ENUM_INTEGER_MINUS_1,
];
}
@ -142,7 +150,8 @@ class EnumTest implements ArrayAccess
public function getEnumNumberAllowableValues()
{
return [
self::ENUM_NUMBER_1_DOT_1,
self::ENUM_NUMBER_MINUS_1_DOT_2,
];
}
@ -169,7 +178,7 @@ class EnumTest implements ArrayAccess
*
* @return array invalid properties with reasons
*/
public function list_invalid_properties()
public function listInvalidProperties()
{
$invalid_properties = array();
$allowed_values = array("UPPER", "lower");

View File

@ -69,7 +69,7 @@ class FormatTest implements ArrayAccess
'binary' => 'string',
'date' => '\DateTime',
'date_time' => '\DateTime',
'uuid' => 'UUID',
'uuid' => 'string',
'password' => 'string'
);
@ -578,7 +578,7 @@ class FormatTest implements ArrayAccess
/**
* Gets uuid
* @return UUID
* @return string
*/
public function getUuid()
{
@ -587,7 +587,7 @@ class FormatTest implements ArrayAccess
/**
* Sets uuid
* @param UUID $uuid
* @param string $uuid
* @return $this
*/
public function setUuid($uuid)

View File

@ -122,6 +122,9 @@ class Order implements ArrayAccess
return self::$getters;
}
const STATUS_PLACED = 'placed';
const STATUS_APPROVED = 'approved';
const STATUS_DELIVERED = 'delivered';
@ -132,7 +135,9 @@ class Order implements ArrayAccess
public function getStatusAllowableValues()
{
return [
self::STATUS_PLACED,
self::STATUS_APPROVED,
self::STATUS_DELIVERED,
];
}

View File

@ -122,6 +122,9 @@ class Pet implements ArrayAccess
return self::$getters;
}
const STATUS_AVAILABLE = 'available';
const STATUS_PENDING = 'pending';
const STATUS_SOLD = 'sold';
@ -132,7 +135,9 @@ class Pet implements ArrayAccess
public function getStatusAllowableValues()
{
return [
self::STATUS_AVAILABLE,
self::STATUS_PENDING,
self::STATUS_SOLD,
];
}

View File

@ -268,7 +268,11 @@ class ObjectSerializer
}
$deserialized = new \SplFileObject($filename, "w");
$byte_written = $deserialized->fwrite($data);
error_log("[INFO] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
if (Configuration::getDefaultConfiguration()->getDebug()) {
error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
}
return $deserialized;
} else {