diff --git a/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md b/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md index 93a0a021bed..407ee95e994 100644 --- a/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md +++ b/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md @@ -294,8 +294,8 @@ $int64 = 56; // int | None $float = 3.4; // float | None $string = "string_example"; // string | None $binary = "binary_example"; // string | None -$date = "date_example"; // \DateTime | None -$date_time = "date_time_example"; // \DateTime | None +$date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | None +$date_time = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | None $password = "password_example"; // string | None $callback = "callback_example"; // string | None @@ -314,13 +314,13 @@ Name | Type | Description | Notes **number** | **BigDecimal**| None | **double** | **double**| None | **pattern_without_delimiter** | **string**| None | - **byte** | **string**| None | + **byte** | **string****string**| None | **integer** | **int**| None | [optional] **int32** | **int**| None | [optional] **int64** | **int**| None | [optional] **float** | **float**| None | [optional] **string** | **string**| None | [optional] - **binary** | **string**| None | [optional] + **binary** | **string****string**| None | [optional] **date** | **\DateTime**| None | [optional] **date_time** | **\DateTime**| None | [optional] **password** | **string**| None | [optional] diff --git a/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md b/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md index dc6a9fb94e1..5beb474fe54 100644 --- a/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md +++ b/samples/openapi3/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md @@ -419,7 +419,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pet_id** | **int**| ID of pet to update | **additional_metadata** | **string**| Additional data to pass to server | [optional] - **file** | **string**| file to upload | [optional] + **file** | **string****string**| file to upload | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php index b35eda5bd31..306cf69eefb 100644 --- a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php @@ -1641,11 +1641,13 @@ class FakeApi } // form params if ($byte !== null) { - $formParams['byte'] = ObjectSerializer::toFormValue($byte); + $multipart = true; + $formParams['byte'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($byte), 'rb'); } // form params if ($binary !== null) { - $formParams['binary'] = ObjectSerializer::toFormValue($binary); + $multipart = true; + $formParams['binary'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($binary), 'rb'); } // form params if ($date !== null) { diff --git a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index a0fb0b9a48e..302392042a1 100644 --- a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -2031,7 +2031,8 @@ class PetApi } // form params if ($file !== null) { - $formParams['file'] = ObjectSerializer::toFormValue($file); + $multipart = true; + $formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb'); } // body params $_tempBody = null; diff --git a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/Body3.php b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/Body3.php index 1d5e6732eb1..cf6c0709d8d 100644 --- a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/Body3.php +++ b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/Body3.php @@ -295,11 +295,11 @@ class Body3 implements ModelInterface, ArrayAccess if ($this->container['byte'] === null) { $invalidProperties[] = "'byte' can't be null"; } - if (!is_null($this->container['password']) && (strlen($this->container['password']) > 64)) { + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 64)) { $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 64."; } - if (!is_null($this->container['password']) && (strlen($this->container['password']) < 10)) { + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) < 10)) { $invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10."; } @@ -339,10 +339,10 @@ class Body3 implements ModelInterface, ArrayAccess if ($this->container['byte'] === null) { return false; } - if (strlen($this->container['password']) > 64) { + if (mb_strlen($this->container['password']) > 64) { return false; } - if (strlen($this->container['password']) < 10) { + if (mb_strlen($this->container['password']) < 10) { return false; } return true; @@ -672,10 +672,10 @@ class Body3 implements ModelInterface, ArrayAccess */ public function setPassword($password) { - if (!is_null($password) && (strlen($password) > 64)) { + if (!is_null($password) && (mb_strlen($password) > 64)) { throw new \InvalidArgumentException('invalid length for $password when calling Body3., must be smaller than or equal to 64.'); } - if (!is_null($password) && (strlen($password) < 10)) { + if (!is_null($password) && (mb_strlen($password) < 10)) { throw new \InvalidArgumentException('invalid length for $password when calling Body3., must be bigger than or equal to 10.'); } diff --git a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php index b80143dbc3a..9210ba363d0 100644 --- a/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php @@ -289,11 +289,11 @@ class FormatTest implements ModelInterface, ArrayAccess if ($this->container['password'] === null) { $invalidProperties[] = "'password' can't be null"; } - if ((strlen($this->container['password']) > 64)) { + if ((mb_strlen($this->container['password']) > 64)) { $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 64."; } - if ((strlen($this->container['password']) < 10)) { + if ((mb_strlen($this->container['password']) < 10)) { $invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10."; } @@ -333,10 +333,10 @@ class FormatTest implements ModelInterface, ArrayAccess if ($this->container['password'] === null) { return false; } - if (strlen($this->container['password']) > 64) { + if (mb_strlen($this->container['password']) > 64) { return false; } - if (strlen($this->container['password']) < 10) { + if (mb_strlen($this->container['password']) < 10) { return false; } return true; @@ -666,10 +666,10 @@ class FormatTest implements ModelInterface, ArrayAccess */ public function setPassword($password) { - if ((strlen($password) > 64)) { + if ((mb_strlen($password) > 64)) { throw new \InvalidArgumentException('invalid length for $password when calling FormatTest., must be smaller than or equal to 64.'); } - if ((strlen($password) < 10)) { + if ((mb_strlen($password) < 10)) { throw new \InvalidArgumentException('invalid length for $password when calling FormatTest., must be bigger than or equal to 10.'); }