diff --git a/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache b/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache index 0f5de349aca3..86ca232a6ccd 100644 --- a/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache @@ -78,7 +78,7 @@ class ObjectSerializer * * @return string the sanitized filename */ - public function sanitizeFilename($filename) + public static function sanitizeFilename($filename) { if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { return $match[1]; @@ -257,7 +257,7 @@ class ObjectSerializer // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } diff --git a/modules/swagger-codegen/src/main/resources/php/configuration.mustache b/modules/swagger-codegen/src/main/resources/php/configuration.mustache index edd0f76bf55e..eee903c0da7e 100644 --- a/modules/swagger-codegen/src/main/resources/php/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/php/configuration.mustache @@ -445,6 +445,8 @@ class Configuration /** * Set whether to accept encoding * @param bool $allowEncoding + * + * @return $this */ public function setAllowEncoding($allowEncoding) { diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index a68094996d30..851f1c2e45cf 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -1,5 +1,5 @@ # SwaggerClient-php -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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: @@ -56,14 +56,16 @@ Please follow the [installation procedure](#installation--usage) and then run th setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new Swagger\Client\Api\PetApi(); +$body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store try { - $result = $api_instance->fakeOuterBooleanSerialize($body); - print_r($result); + $api_instance->addPet($body); } catch (Exception $e) { - echo 'Exception when calling FakeApi->fakeOuterBooleanSerialize: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL; } ?> @@ -71,17 +73,10 @@ try { ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FakeApi* | [**fakeOuterBooleanSerialize**](docs/Api/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**fakeOuterCompositeSerialize**](docs/Api/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**fakeOuterNumberSerialize**](docs/Api/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**fakeOuterStringSerialize**](docs/Api/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**testClientModel**](docs/Api/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum 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 @@ -90,9 +85,9 @@ Class | Method | HTTP request | Description *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/{order_id} | Delete purchase order by ID +*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/{order_id} | Find purchase order by ID +*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 @@ -106,42 +101,12 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [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) - - [ArrayTest](docs/Model/ArrayTest.md) - - [Capitalization](docs/Model/Capitalization.md) - [Category](docs/Model/Category.md) - - [ClassModel](docs/Model/ClassModel.md) - - [Client](docs/Model/Client.md) - - [EnumArrays](docs/Model/EnumArrays.md) - - [EnumClass](docs/Model/EnumClass.md) - - [EnumTest](docs/Model/EnumTest.md) - - [FormatTest](docs/Model/FormatTest.md) - - [HasOnlyReadOnly](docs/Model/HasOnlyReadOnly.md) - - [MapTest](docs/Model/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model/Model200Response.md) - - [ModelList](docs/Model/ModelList.md) - - [ModelReturn](docs/Model/ModelReturn.md) - - [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) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) - - [Cat](docs/Model/Cat.md) - - [Dog](docs/Model/Dog.md) ## Documentation For Authorization @@ -153,10 +118,6 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key - **Location**: HTTP header -## http_basic_test - -- **Type**: HTTP basic authentication - ## petstore_auth - **Type**: OAuth diff --git a/samples/client/petstore/php/SwaggerClient-php/autoload.php b/samples/client/petstore/php/SwaggerClient-php/autoload.php index 93945af887f3..757af22d9566 100644 --- a/samples/client/petstore/php/SwaggerClient-php/autoload.php +++ b/samples/client/petstore/php/SwaggerClient-php/autoload.php @@ -3,7 +3,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md index aee0e2b4d18f..57c9b91d9082 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md @@ -1,6 +1,6 @@ # Swagger\Client\PetApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md index 603470480781..565acd5ff70c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md @@ -1,12 +1,12 @@ # Swagger\Client\StoreApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md index ba9673f784d8..c4135a2c2f11 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md @@ -1,6 +1,6 @@ # Swagger\Client\UserApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- 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 b6b7455fad28..615b28efa3fd 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -12,7 +12,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index b609960c5f11..b607a2bed551 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -12,7 +12,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -118,7 +118,7 @@ class StoreApi throw new \InvalidArgumentException('Missing the required parameter $order_id when calling deleteOrder'); } // parse inputs - $resourcePath = "/store/order/{order_id}"; + $resourcePath = "/store/order/{orderId}"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -132,7 +132,7 @@ class StoreApi // path params if ($order_id !== null) { $resourcePath = str_replace( - "{" . "order_id" . "}", + "{" . "orderId" . "}", $this->apiClient->getSerializer()->toPathValue($order_id), $resourcePath ); @@ -153,7 +153,7 @@ class StoreApi $httpBody, $headerParams, null, - '/store/order/{order_id}' + '/store/order/{orderId}' ); return [null, $statusCode, $httpHeader]; @@ -276,7 +276,7 @@ class StoreApi } // parse inputs - $resourcePath = "/store/order/{order_id}"; + $resourcePath = "/store/order/{orderId}"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -290,7 +290,7 @@ class StoreApi // path params if ($order_id !== null) { $resourcePath = str_replace( - "{" . "order_id" . "}", + "{" . "orderId" . "}", $this->apiClient->getSerializer()->toPathValue($order_id), $resourcePath ); @@ -311,7 +311,7 @@ class StoreApi $httpBody, $headerParams, '\Swagger\Client\Model\Order', - '/store/order/{order_id}' + '/store/order/{orderId}' ); return [$this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order', $httpHeader), $statusCode, $httpHeader]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index e628149a8186..f63aac1eb2c2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -12,7 +12,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php index ce0255914472..f7643a1a5fbb 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php index 2c1a040490b5..2ba9415df17d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php @@ -12,7 +12,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php index d85d33af0511..67b86118103a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php @@ -12,7 +12,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -88,7 +88,7 @@ class Configuration * * @var string */ - protected $host = 'http://petstore.swagger.io:80/v2'; + protected $host = 'http://petstore.swagger.io/v2'; /** * Timeout (second) of the HTTP request, by default set to 0, no timeout @@ -455,6 +455,8 @@ class Configuration /** * Set whether to accept encoding * @param bool $allowEncoding + * + * @return $this */ public function setAllowEncoding($allowEncoding) { 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 e20c4808486d..16124151b08b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -35,6 +35,7 @@ use \ArrayAccess; * ApiResponse Class Doc Comment * * @category Class + * @description Describes the result of uploading an image resource * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen 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 b1796844d4e4..ccc9321f682e 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -35,6 +35,7 @@ use \ArrayAccess; * Category Class Doc Comment * * @category Class + * @description A category for a pet * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen 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 e6f1c6c22f1e..f1bc90f1ff50 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -35,6 +35,7 @@ use \ArrayAccess; * Order Class Doc Comment * * @category Class + * @description An order for a pets from the pet store * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen 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 3f66a60e76d5..755b7ca81573 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -35,6 +35,7 @@ use \ArrayAccess; * Pet Class Doc Comment * * @category Class + * @description A pet for sale in the pet store * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen 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 960269842071..6f9b9d57b2db 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -35,6 +35,7 @@ use \ArrayAccess; * Tag Class Doc Comment * * @category Class + * @description A tag for a pet * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen 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 59dd2f7268cb..94713bb7fffc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -35,6 +35,7 @@ use \ArrayAccess; * User Class Doc Comment * * @category Class + * @description A User who is purchasing from the pet store * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php index 0f9f527a2acf..1d96d3f9ee0d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php @@ -13,7 +13,7 @@ /** * Swagger Petstore * - * 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 is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -88,7 +88,7 @@ class ObjectSerializer * * @return string the sanitized filename */ - public function sanitizeFilename($filename) + public static function sanitizeFilename($filename) { if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { return $match[1]; @@ -267,7 +267,7 @@ class ObjectSerializer // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } diff --git a/samples/client/petstore/php/SwaggerClient-php/phpunit.xml.dist b/samples/client/petstore/php/SwaggerClient-php/phpunit.xml.dist index c12ee1484773..cadedbc24690 100644 --- a/samples/client/petstore/php/SwaggerClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php/SwaggerClient-php/phpunit.xml.dist @@ -14,8 +14,8 @@ - ./lib/Api - ./lib/Model + ./lib\Api + ./lib\Model