From e1a03553984ccd282e991d00eb1ed8773be5c9be Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 26 Apr 2018 13:17:16 +0800 Subject: [PATCH] Update PHP samples with OAS2 before enabling CI test (#230) * update php samples with oas2 before enabling ci test * deleted unused php files --- .../petstore/php/SwaggerClient-php/README.md | 4 - .../php/SwaggerClient-php/docs/Animal.md | 11 - .../php/SwaggerClient-php/docs/AnimalFarm.md | 9 - .../SwaggerClient-php/docs/Api/DefaultApi.md | 57 ---- .../php/SwaggerClient-php/docs/Api/FakeApi.md | 12 +- .../docs/Api/Fake_classname_tags123Api.md | 57 ---- .../php/SwaggerClient-php/docs/ApiResponse.md | 12 - .../php/SwaggerClient-php/docs/Cat.md | 10 - .../php/SwaggerClient-php/docs/Category.md | 11 - .../php/SwaggerClient-php/docs/Dog.md | 10 - .../php/SwaggerClient-php/docs/EnumClass.md | 9 - .../php/SwaggerClient-php/docs/EnumTest.md | 12 - .../php/SwaggerClient-php/docs/FormatTest.md | 22 -- .../docs/Model/AnimalFarm.md | 9 - .../docs/Model/DefaultError.md | 11 - .../php/SwaggerClient-php/docs/Model/Error.md | 11 - .../docs/Model/OuterBoolean.md | 9 - .../docs/Model/OuterComposite.md | 6 +- .../docs/Model/OuterNumber.md | 9 - .../docs/Model/OuterString.md | 9 - .../docs/Model200Response.md | 10 - .../php/SwaggerClient-php/docs/ModelReturn.md | 10 - .../php/SwaggerClient-php/docs/Name.md | 13 - .../php/SwaggerClient-php/docs/Order.md | 15 - .../php/SwaggerClient-php/docs/Pet.md | 15 - .../docs/SpecialModelName.md | 10 - .../php/SwaggerClient-php/docs/Tag.md | 11 - .../php/SwaggerClient-php/docs/User.md | 17 -- .../php/SwaggerClient-php/lib/Api/FakeApi.php | 36 ++- .../php/SwaggerClient-php/lib/Api/PetApi.php | 6 + .../lib/Model/AdditionalPropertiesClass.php | 3 +- .../SwaggerClient-php/lib/Model/Animal.php | 6 +- .../lib/Model/AnimalFarm.php | 280 ------------------ .../lib/Model/ApiResponse.php | 3 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 3 +- .../lib/Model/ArrayOfNumberOnly.php | 3 +- .../SwaggerClient-php/lib/Model/ArrayTest.php | 3 +- .../lib/Model/Capitalization.php | 3 +- .../php/SwaggerClient-php/lib/Model/Cat.php | 6 +- .../SwaggerClient-php/lib/Model/Category.php | 3 +- .../lib/Model/ClassModel.php | 3 +- .../SwaggerClient-php/lib/Model/Client.php | 3 +- .../php/SwaggerClient-php/lib/Model/Dog.php | 6 +- .../lib/Model/EnumArrays.php | 7 +- .../SwaggerClient-php/lib/Model/EnumTest.php | 22 +- .../lib/Model/FormatTest.php | 57 +--- .../lib/Model/HasOnlyReadOnly.php | 3 +- .../SwaggerClient-php/lib/Model/MapTest.php | 3 +- ...PropertiesAndAdditionalPropertiesClass.php | 3 +- .../lib/Model/Model200Response.php | 3 +- .../SwaggerClient-php/lib/Model/ModelList.php | 3 +- .../lib/Model/ModelReturn.php | 3 +- .../php/SwaggerClient-php/lib/Model/Name.php | 6 +- .../lib/Model/NumberOnly.php | 3 +- .../php/SwaggerClient-php/lib/Model/Order.php | 7 +- .../lib/Model/OuterBoolean.php | 277 ----------------- .../lib/Model/OuterComposite.php | 21 +- .../lib/Model/OuterNumber.php | 277 ----------------- .../lib/Model/OuterString.php | 277 ----------------- .../php/SwaggerClient-php/lib/Model/Pet.php | 13 +- .../lib/Model/ReadOnlyFirst.php | 3 +- .../lib/Model/SpecialModelName.php | 3 +- .../php/SwaggerClient-php/lib/Model/Tag.php | 3 +- .../php/SwaggerClient-php/lib/Model/User.php | 3 +- .../test/Model/AnimalFarmTest.php | 78 ----- .../test/Model/OuterBooleanTest.php | 78 ----- .../test/Model/OuterNumberTest.php | 78 ----- .../test/Model/OuterStringTest.php | 78 ----- 68 files changed, 75 insertions(+), 2002 deletions(-) delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Animal.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Api/DefaultApi.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Api/Fake_classname_tags123Api.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/ApiResponse.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Cat.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Category.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Dog.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/AnimalFarm.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/DefaultError.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/Error.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterBoolean.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterNumber.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterString.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model200Response.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/ModelReturn.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Name.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Order.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Pet.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/SpecialModelName.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Tag.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/User.md delete mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/AnimalFarmTest.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/OuterBooleanTest.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/OuterNumberTest.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/OuterStringTest.php diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index 1d67cf9e6ee..a64dc76e3ce 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -117,7 +117,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesClass](docs/Model/AdditionalPropertiesClass.md) - [Animal](docs/Model/Animal.md) - - [AnimalFarm](docs/Model/AnimalFarm.md) - [ApiResponse](docs/Model/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/Model/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/Model/ArrayOfNumberOnly.md) @@ -141,11 +140,8 @@ Class | Method | HTTP request | Description - [Name](docs/Model/Name.md) - [NumberOnly](docs/Model/NumberOnly.md) - [Order](docs/Model/Order.md) - - [OuterBoolean](docs/Model/OuterBoolean.md) - [OuterComposite](docs/Model/OuterComposite.md) - [OuterEnum](docs/Model/OuterEnum.md) - - [OuterNumber](docs/Model/OuterNumber.md) - - [OuterString](docs/Model/OuterString.md) - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SpecialModelName](docs/Model/SpecialModelName.md) diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Animal.md b/samples/client/petstore/php/SwaggerClient-php/docs/Animal.md deleted file mode 100644 index c57fbe8ea4a..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**class_name** | **string** | | -**color** | **string** | | [optional] [default to 'red'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md b/samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/DefaultApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/DefaultApi.md deleted file mode 100644 index 0185322ccf2..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/DefaultApi.md +++ /dev/null @@ -1,57 +0,0 @@ -# Swagger\Client\DefaultApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testBodyWithQueryParams**](DefaultApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | - - -# **testBodyWithQueryParams** -> testBodyWithQueryParams($body, $query) - - - -### Example -```php -testBodyWithQueryParams($body, $query); -} catch (Exception $e) { - echo 'Exception when calling DefaultApi->testBodyWithQueryParams: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\User**](../Model/User.md)| | - **query** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[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) - 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 01d96331906..f938b54df7c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description # **fakeOuterBooleanSerialize** -> \Swagger\Client\Model\OuterBoolean fakeOuterBooleanSerialize($boolean_post_body) +> bool fakeOuterBooleanSerialize($boolean_post_body) @@ -52,7 +52,7 @@ Name | Type | Description | Notes ### Return type -[**\Swagger\Client\Model\OuterBoolean**](../Model/OuterBoolean.md) +**bool** ### Authorization @@ -115,7 +115,7 @@ No authorization required [[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) # **fakeOuterNumberSerialize** -> \Swagger\Client\Model\OuterNumber fakeOuterNumberSerialize($body) +> float fakeOuterNumberSerialize($body) @@ -150,7 +150,7 @@ Name | Type | Description | Notes ### Return type -[**\Swagger\Client\Model\OuterNumber**](../Model/OuterNumber.md) +**float** ### Authorization @@ -164,7 +164,7 @@ No authorization required [[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) # **fakeOuterStringSerialize** -> \Swagger\Client\Model\OuterString fakeOuterStringSerialize($body) +> string fakeOuterStringSerialize($body) @@ -199,7 +199,7 @@ Name | Type | Description | Notes ### Return type -[**\Swagger\Client\Model\OuterString**](../Model/OuterString.md) +**string** ### Authorization diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/Fake_classname_tags123Api.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/Fake_classname_tags123Api.md deleted file mode 100644 index d5fe15b46fc..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/Fake_classname_tags123Api.md +++ /dev/null @@ -1,57 +0,0 @@ -# Swagger\Client\Fake_classname_tags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -> \Swagger\Client\Model\Client testClassname($body) - -To test class name in snake case - -### Example -```php -setApiKey('api_key_query', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key_query', 'Bearer'); - -$api_instance = new Swagger\Client\Api\Fake_classname_tags123Api(new \Http\Adapter\Guzzle6\Client()); -$body = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model - -try { - $result = $api_instance->testClassname($body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling Fake_classname_tags123Api->testClassname: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\Client**](../Model/Client.md)| client model | - -### Return type - -[**\Swagger\Client\Model\Client**](../Model/Client.md) - -### Authorization - -[api_key_query](../../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/ApiResponse.md b/samples/client/petstore/php/SwaggerClient-php/docs/ApiResponse.md deleted file mode 100644 index 9d351183422..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **int** | | [optional] -**type** | **string** | | [optional] -**message** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Cat.md b/samples/client/petstore/php/SwaggerClient-php/docs/Cat.md deleted file mode 100644 index 8d30565d014..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Category.md b/samples/client/petstore/php/SwaggerClient-php/docs/Category.md deleted file mode 100644 index 80aef312e5e..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Dog.md b/samples/client/petstore/php/SwaggerClient-php/docs/Dog.md deleted file mode 100644 index 3c04bdf4cf7..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md b/samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md deleted file mode 100644 index 67f017becd0..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md b/samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md deleted file mode 100644 index 2ef9e6adaac..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enum_string** | **string** | | [optional] -**enum_integer** | **int** | | [optional] -**enum_number** | **double** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md b/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md deleted file mode 100644 index 90531d28c40..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **int** | | [optional] -**int32** | **int** | | [optional] -**int64** | **int** | | [optional] -**number** | **float** | | -**float** | **float** | | [optional] -**double** | **double** | | [optional] -**string** | **string** | | [optional] -**byte** | **string** | | -**binary** | **string** | | [optional] -**date** | [**\DateTime**](Date.md) | | -**date_time** | [**\DateTime**](\DateTime.md) | | [optional] -**uuid** | [**UUID**](UUID.md) | | [optional] -**password** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/AnimalFarm.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/AnimalFarm.md deleted file mode 100644 index df6bab21dae..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/DefaultError.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/DefaultError.md deleted file mode 100644 index 5ed20691fdc..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/DefaultError.md +++ /dev/null @@ -1,11 +0,0 @@ -# DefaultError - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **string** | | [optional] -**code** | **float** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/Error.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/Error.md deleted file mode 100644 index 5cf4ee67d0e..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/Error.md +++ /dev/null @@ -1,11 +0,0 @@ -# Error - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **string** | | [optional] -**code** | **float** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterBoolean.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterBoolean.md deleted file mode 100644 index 8b243399474..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterBoolean.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterBoolean - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterComposite.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterComposite.md index 8f791968a37..e7967521395 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterComposite.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterComposite.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**my_number** | [**\Swagger\Client\Model\OuterNumber**](OuterNumber.md) | | [optional] -**my_string** | [**\Swagger\Client\Model\OuterString**](OuterString.md) | | [optional] -**my_boolean** | [**\Swagger\Client\Model\OuterBoolean**](OuterBoolean.md) | | [optional] +**my_number** | **float** | | [optional] +**my_string** | **string** | | [optional] +**my_boolean** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterNumber.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterNumber.md deleted file mode 100644 index 8aa37f329bd..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterNumber.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterNumber - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterString.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterString.md deleted file mode 100644 index 9ccaadaf98d..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model/OuterString.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterString - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model200Response.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model200Response.md deleted file mode 100644 index e29747a87e7..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Model200Response.md +++ /dev/null @@ -1,10 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/ModelReturn.md b/samples/client/petstore/php/SwaggerClient-php/docs/ModelReturn.md deleted file mode 100644 index 9adb62e1e12..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/ModelReturn.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModelReturn - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Name.md b/samples/client/petstore/php/SwaggerClient-php/docs/Name.md deleted file mode 100644 index 4565647e1ef..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | -**snake_case** | **int** | | [optional] -**property** | **string** | | [optional] -**_123_number** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Order.md b/samples/client/petstore/php/SwaggerClient-php/docs/Order.md deleted file mode 100644 index ddae5cc2b57..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**pet_id** | **int** | | [optional] -**quantity** | **int** | | [optional] -**ship_date** | [**\DateTime**](\DateTime.md) | | [optional] -**status** | **string** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Pet.md b/samples/client/petstore/php/SwaggerClient-php/docs/Pet.md deleted file mode 100644 index 4525fe7d776..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**category** | [**\Swagger\Client\Model\Category**](Category.md) | | [optional] -**name** | **string** | | -**photo_urls** | **string[]** | | -**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional] -**status** | **string** | pet status in the store | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/SpecialModelName.md b/samples/client/petstore/php/SwaggerClient-php/docs/SpecialModelName.md deleted file mode 100644 index 022ee19169c..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**special_property_name** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Tag.md b/samples/client/petstore/php/SwaggerClient-php/docs/Tag.md deleted file mode 100644 index 15ec3e0a91d..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/User.md b/samples/client/petstore/php/SwaggerClient-php/docs/User.md deleted file mode 100644 index ff278fd4889..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**username** | **string** | | [optional] -**first_name** | **string** | | [optional] -**last_name** | **string** | | [optional] -**email** | **string** | | [optional] -**password** | **string** | | [optional] -**phone** | **string** | | [optional] -**user_status** | **int** | User Status | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - 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 89167163af4..8f8e75fbcbe 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php @@ -94,7 +94,7 @@ class FakeApi * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Swagger\Client\Model\OuterBoolean + * @return bool */ public function fakeOuterBooleanSerialize($boolean_post_body = null) { @@ -109,11 +109,11 @@ class FakeApi * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Swagger\Client\Model\OuterBoolean, HTTP status code, HTTP response headers (array of strings) + * @return array of bool, HTTP status code, HTTP response headers (array of strings) */ public function fakeOuterBooleanSerializeWithHttpInfo($boolean_post_body = null) { - $returnType = '\Swagger\Client\Model\OuterBoolean'; + $returnType = 'bool'; $request = $this->fakeOuterBooleanSerializeRequest($boolean_post_body); try { @@ -165,7 +165,7 @@ class FakeApi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Swagger\Client\Model\OuterBoolean', + 'bool', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -207,7 +207,7 @@ class FakeApi */ public function fakeOuterBooleanSerializeAsyncWithHttpInfo($boolean_post_body = null) { - $returnType = '\Swagger\Client\Model\OuterBoolean'; + $returnType = 'bool'; $request = $this->fakeOuterBooleanSerializeRequest($boolean_post_body); return $this->client @@ -588,7 +588,7 @@ class FakeApi * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Swagger\Client\Model\OuterNumber + * @return float */ public function fakeOuterNumberSerialize($body = null) { @@ -603,11 +603,11 @@ class FakeApi * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Swagger\Client\Model\OuterNumber, HTTP status code, HTTP response headers (array of strings) + * @return array of float, HTTP status code, HTTP response headers (array of strings) */ public function fakeOuterNumberSerializeWithHttpInfo($body = null) { - $returnType = '\Swagger\Client\Model\OuterNumber'; + $returnType = 'float'; $request = $this->fakeOuterNumberSerializeRequest($body); try { @@ -659,7 +659,7 @@ class FakeApi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Swagger\Client\Model\OuterNumber', + 'float', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -701,7 +701,7 @@ class FakeApi */ public function fakeOuterNumberSerializeAsyncWithHttpInfo($body = null) { - $returnType = '\Swagger\Client\Model\OuterNumber'; + $returnType = 'float'; $request = $this->fakeOuterNumberSerializeRequest($body); return $this->client @@ -835,7 +835,7 @@ class FakeApi * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Swagger\Client\Model\OuterString + * @return string */ public function fakeOuterStringSerialize($body = null) { @@ -850,11 +850,11 @@ class FakeApi * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Swagger\Client\Model\OuterString, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function fakeOuterStringSerializeWithHttpInfo($body = null) { - $returnType = '\Swagger\Client\Model\OuterString'; + $returnType = 'string'; $request = $this->fakeOuterStringSerializeRequest($body); try { @@ -906,7 +906,7 @@ class FakeApi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Swagger\Client\Model\OuterString', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -948,7 +948,7 @@ class FakeApi */ public function fakeOuterStringSerializeAsyncWithHttpInfo($body = null) { - $returnType = '\Swagger\Client\Model\OuterString'; + $returnType = 'string'; $request = $this->fakeOuterStringSerializeRequest($body); return $this->client @@ -2152,6 +2152,9 @@ class FakeApi $multipart = false; // query params + if (is_array($enum_query_string_array)) { + $enum_query_string_array = ObjectSerializer::serializeCollection($enum_query_string_array, 'csv', true); + } if ($enum_query_string_array !== null) { $queryParams['enum_query_string_array'] = ObjectSerializer::toQueryValue($enum_query_string_array); } @@ -2168,6 +2171,9 @@ class FakeApi $queryParams['enum_query_double'] = ObjectSerializer::toQueryValue($enum_query_double); } // header params + if (is_array($enum_header_string_array)) { + $enum_header_string_array = ObjectSerializer::serializeCollection($enum_header_string_array, 'csv'); + } if ($enum_header_string_array !== null) { $headerParams['enum_header_string_array'] = ObjectSerializer::toHeaderValue($enum_header_string_array); } 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 146db018a82..f2faa30fb33 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -738,6 +738,9 @@ class PetApi $multipart = false; // query params + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, 'csv', true); + } if ($status !== null) { $queryParams['status'] = ObjectSerializer::toQueryValue($status); } @@ -1000,6 +1003,9 @@ class PetApi $multipart = false; // query params + if (is_array($tags)) { + $tags = ObjectSerializer::serializeCollection($tags, 'csv', true); + } if ($tags !== null) { $queryParams['tags'] = ObjectSerializer::toQueryValue($tags); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php index 7512ca4e5e4..0a3d060c15d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php @@ -206,8 +206,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php index aa5f32d9580..cd4f95057e7 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php @@ -213,11 +213,7 @@ class Animal implements ModelInterface, ArrayAccess */ public function valid() { - - if ($this->container['class_name'] === null) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php deleted file mode 100644 index acb677b8c00..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php +++ /dev/null @@ -1,280 +0,0 @@ -container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php index 8d205cc68bb..a2bc2248c31 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php @@ -212,8 +212,7 @@ class ApiResponse implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 6b1bd4f6e89..26534fa8b3b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -200,8 +200,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfNumberOnly.php index 9d757dc67c0..1990b26c791 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfNumberOnly.php @@ -200,8 +200,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php index b2152d435c2..b6d7573af44 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php @@ -212,8 +212,7 @@ class ArrayTest implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Capitalization.php index cda89021f91..72141aa7212 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Capitalization.php @@ -230,8 +230,7 @@ class Capitalization implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php index 00a34932a2d..65b9b627b2c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php @@ -194,11 +194,7 @@ class Cat extends Animal */ public function valid() { - if (!parent::valid()) { - return false; - } - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php index 32f77c580d8..a9df5010b9a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -206,8 +206,7 @@ class Category implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ClassModel.php index 5ad46465baf..5f478671bff 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ClassModel.php @@ -201,8 +201,7 @@ class ClassModel implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Client.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Client.php index 2acdd8aadaa..d5e9af6025b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Client.php @@ -200,8 +200,7 @@ class Client implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php index 5caf83b8304..c0d73172f12 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php @@ -194,11 +194,7 @@ class Dog extends Animal */ public function valid() { - if (!parent::valid()) { - return false; - } - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumArrays.php index 26a6c705d49..f68c7de4b40 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumArrays.php @@ -244,12 +244,7 @@ class EnumArrays implements ModelInterface, ArrayAccess */ public function valid() { - - $allowedValues = $this->getJustSymbolAllowableValues(); - if (!is_null($this->container['just_symbol']) && !in_array($this->container['just_symbol'], $allowedValues, true)) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php index e57642debf2..7bc0ceaa9f7 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php @@ -323,27 +323,7 @@ class EnumTest implements ModelInterface, ArrayAccess */ public function valid() { - - $allowedValues = $this->getEnumStringAllowableValues(); - if (!is_null($this->container['enum_string']) && !in_array($this->container['enum_string'], $allowedValues, true)) { - return false; - } - if ($this->container['enum_string_required'] === null) { - return false; - } - $allowedValues = $this->getEnumStringRequiredAllowableValues(); - if (!is_null($this->container['enum_string_required']) && !in_array($this->container['enum_string_required'], $allowedValues, true)) { - return false; - } - $allowedValues = $this->getEnumIntegerAllowableValues(); - if (!is_null($this->container['enum_integer']) && !in_array($this->container['enum_integer'], $allowedValues, true)) { - return false; - } - $allowedValues = $this->getEnumNumberAllowableValues(); - if (!is_null($this->container['enum_number']) && !in_array($this->container['enum_number'], $allowedValues, true)) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php index fecb48296e4..1adb5a5b43d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php @@ -340,62 +340,7 @@ class FormatTest implements ModelInterface, ArrayAccess */ public function valid() { - - if ($this->container['integer'] > 100) { - return false; - } - if ($this->container['integer'] < 10) { - return false; - } - if ($this->container['int32'] > 200) { - return false; - } - if ($this->container['int32'] < 20) { - return false; - } - if ($this->container['number'] === null) { - return false; - } - if ($this->container['number'] > 543.2) { - return false; - } - if ($this->container['number'] < 32.1) { - return false; - } - if ($this->container['float'] > 987.6) { - return false; - } - if ($this->container['float'] < 54.3) { - return false; - } - if ($this->container['double'] > 123.4) { - return false; - } - if ($this->container['double'] < 67.8) { - return false; - } - if (!preg_match("/[a-z]/i", $this->container['string'])) { - return false; - } - if ($this->container['byte'] === null) { - return false; - } - if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) { - return false; - } - if ($this->container['date'] === null) { - return false; - } - if ($this->container['password'] === null) { - return false; - } - if (mb_strlen($this->container['password']) > 64) { - return false; - } - if (mb_strlen($this->container['password']) < 10) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/HasOnlyReadOnly.php index db25cac8084..f50d3875d24 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/HasOnlyReadOnly.php @@ -206,8 +206,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MapTest.php index d96af580b0d..3777bcfa677 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MapTest.php @@ -221,8 +221,7 @@ class MapTest implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index fac70fa65e7..377c58c3e32 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -212,8 +212,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php index f0d46fd5ee5..a1feed42400 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php @@ -207,8 +207,7 @@ class Model200Response implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelList.php index 0d5d7f66b93..5bd547e1668 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelList.php @@ -200,8 +200,7 @@ class ModelList implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php index 2f9e91bf7a5..c9ba0e51311 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php @@ -201,8 +201,7 @@ class ModelReturn implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php index 2963f8b2808..05b0067efcd 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php @@ -222,11 +222,7 @@ class Name implements ModelInterface, ArrayAccess */ public function valid() { - - if ($this->container['name'] === null) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/NumberOnly.php index cd2ae8517d2..89c766034c0 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/NumberOnly.php @@ -200,8 +200,7 @@ class NumberOnly implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php index a5dfe109abb..c2a0c22bbaf 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -255,12 +255,7 @@ class Order implements ModelInterface, ArrayAccess */ public function valid() { - - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php deleted file mode 100644 index 06bd24f8714..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php +++ /dev/null @@ -1,277 +0,0 @@ -container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterComposite.php index 61a5143b9ed..306f917d0c1 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterComposite.php @@ -57,9 +57,9 @@ class OuterComposite implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'my_number' => '\Swagger\Client\Model\OuterNumber', - 'my_string' => '\Swagger\Client\Model\OuterString', - 'my_boolean' => '\Swagger\Client\Model\OuterBoolean' + 'my_number' => 'float', + 'my_string' => 'string', + 'my_boolean' => 'bool' ]; /** @@ -212,15 +212,14 @@ class OuterComposite implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } /** * Gets my_number * - * @return \Swagger\Client\Model\OuterNumber + * @return float */ public function getMyNumber() { @@ -230,7 +229,7 @@ class OuterComposite implements ModelInterface, ArrayAccess /** * Sets my_number * - * @param \Swagger\Client\Model\OuterNumber $my_number my_number + * @param float $my_number my_number * * @return $this */ @@ -244,7 +243,7 @@ class OuterComposite implements ModelInterface, ArrayAccess /** * Gets my_string * - * @return \Swagger\Client\Model\OuterString + * @return string */ public function getMyString() { @@ -254,7 +253,7 @@ class OuterComposite implements ModelInterface, ArrayAccess /** * Sets my_string * - * @param \Swagger\Client\Model\OuterString $my_string my_string + * @param string $my_string my_string * * @return $this */ @@ -268,7 +267,7 @@ class OuterComposite implements ModelInterface, ArrayAccess /** * Gets my_boolean * - * @return \Swagger\Client\Model\OuterBoolean + * @return bool */ public function getMyBoolean() { @@ -278,7 +277,7 @@ class OuterComposite implements ModelInterface, ArrayAccess /** * Sets my_boolean * - * @param \Swagger\Client\Model\OuterBoolean $my_boolean my_boolean + * @param bool $my_boolean my_boolean * * @return $this */ diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php deleted file mode 100644 index 59e9b8f1016..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php +++ /dev/null @@ -1,277 +0,0 @@ -container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php deleted file mode 100644 index 0efbc88867e..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php +++ /dev/null @@ -1,277 +0,0 @@ -container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php index 3ad44bb0605..acb957ac9cb 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -261,18 +261,7 @@ class Pet implements ModelInterface, ArrayAccess */ public function valid() { - - if ($this->container['name'] === null) { - return false; - } - if ($this->container['photo_urls'] === null) { - return false; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - return false; - } - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php index c7eb5cb3339..43364888a37 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php @@ -206,8 +206,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php index f3c4e56ce65..d69e6273eb5 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php @@ -200,8 +200,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php index bf9b63dfaed..cb04b9bc8f7 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -206,8 +206,7 @@ class Tag implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php index 0cfe061e7a6..1e6f4d75deb 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -242,8 +242,7 @@ class User implements ModelInterface, ArrayAccess */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/AnimalFarmTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/AnimalFarmTest.php deleted file mode 100644 index 9ecad0f7514..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/test/Model/AnimalFarmTest.php +++ /dev/null @@ -1,78 +0,0 @@ -