diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index c80ee27a3d..8c889b19a0 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -303,6 +303,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("ApiException.mustache", toPackagePath(invokerPackage, srcBasePath), "ApiException.php")); supportingFiles.add(new SupportingFile("Configuration.mustache", toPackagePath(invokerPackage, srcBasePath), "Configuration.php")); supportingFiles.add(new SupportingFile("ObjectSerializer.mustache", toPackagePath(invokerPackage, srcBasePath), "ObjectSerializer.php")); + supportingFiles.add(new SupportingFile("ModelInterface.mustache", toPackagePath(modelPackage, srcBasePath), "ModelInterface.php")); supportingFiles.add(new SupportingFile("HeaderSelector.mustache", toPackagePath(invokerPackage, srcBasePath), "HeaderSelector.php")); supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json")); supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md")); diff --git a/modules/swagger-codegen/src/main/resources/php/ModelInterface.mustache b/modules/swagger-codegen/src/main/resources/php/ModelInterface.mustache new file mode 100644 index 0000000000..538bf66169 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/php/ModelInterface.mustache @@ -0,0 +1,86 @@ +partial_header}} +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace {{modelPackage}}; + +/** + * Interface abstracting model access. + * + * @package {{modelPackage}} + * @author Swagger Codegen team + */ +interface ModelInterface +{ + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(); + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes(); + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats(); + + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ + public static function attributeMap(); + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(); + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(); + + /** + * Show all the invalid properties with reasons. + * + * @return array + */ + public function listInvalidProperties(); + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool + */ + public function valid(); +} diff --git a/modules/swagger-codegen/src/main/resources/php/model_generic.mustache b/modules/swagger-codegen/src/main/resources/php/model_generic.mustache index 611cdcb013..274fb7176e 100644 --- a/modules/swagger-codegen/src/main/resources/php/model_generic.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model_generic.mustache @@ -1,4 +1,4 @@ -class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}implements ArrayAccess +class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}implements ModelInterface, ArrayAccess { const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; @@ -26,11 +26,21 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple {{/hasMore}}{{/vars}} ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes{{#parentSchema}} + parent::swaggerTypes(){{/parentSchema}}; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats{{#parentSchema}} + parent::swaggerFormats(){{/parentSchema}}; @@ -45,7 +55,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple {{/hasMore}}{{/vars}} ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -55,7 +64,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple {{/hasMore}}{{/vars}} ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -65,21 +73,46 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple {{/hasMore}}{{/vars}} ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + {{#vars}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}const {{enumName}}_{{{name}}} = {{{value}}}; {{/enumVars}}{{/allowableValues}}{{/isEnum}}{{/vars}} @@ -125,7 +158,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore-security-test/php/SwaggerClient-php/lib/Model/ModelInterface.php b/samples/client/petstore-security-test/php/SwaggerClient-php/lib/Model/ModelInterface.php new file mode 100644 index 0000000000..a74455ea5a --- /dev/null +++ b/samples/client/petstore-security-test/php/SwaggerClient-php/lib/Model/ModelInterface.php @@ -0,0 +1,96 @@ + 'int32' ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -84,7 +94,6 @@ class ModelReturn implements ArrayAccess 'return' => 'return' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -93,7 +102,6 @@ class ModelReturn implements ArrayAccess 'return' => 'setReturn' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -102,21 +110,46 @@ class ModelReturn implements ArrayAccess 'return' => 'getReturn' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -137,7 +170,7 @@ class ModelReturn implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore-security-test/php/SwaggerClient-php/lib/ObjectSerializer.php b/samples/client/petstore-security-test/php/SwaggerClient-php/lib/ObjectSerializer.php index d81b6dc020..be925b47fd 100644 --- a/samples/client/petstore-security-test/php/SwaggerClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore-security-test/php/SwaggerClient-php/lib/ObjectSerializer.php @@ -269,7 +269,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/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php index 0b84a56472..caf058f1fc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class AdditionalPropertiesClass implements ArrayAccess +class AdditionalPropertiesClass implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class AdditionalPropertiesClass implements ArrayAccess 'map_of_map_property' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class AdditionalPropertiesClass implements ArrayAccess 'map_of_map_property' => 'map_of_map_property' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class AdditionalPropertiesClass implements ArrayAccess 'map_of_map_property' => 'setMapOfMapProperty' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class AdditionalPropertiesClass implements ArrayAccess 'map_of_map_property' => 'getMapOfMapProperty' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -142,7 +175,7 @@ class AdditionalPropertiesClass implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 5970b8b80f..f2bd0b6ceb 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Animal implements ArrayAccess +class Animal implements ModelInterface, ArrayAccess { const DISCRIMINATOR = 'className'; @@ -67,11 +67,21 @@ class Animal implements ArrayAccess 'color' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class Animal implements ArrayAccess 'color' => 'color' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class Animal implements ArrayAccess 'color' => 'setColor' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class Animal implements ArrayAccess 'color' => 'getColor' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -146,7 +179,7 @@ class Animal implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php index 15f3eb0571..114b1a361a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class AnimalFarm implements ArrayAccess +class AnimalFarm implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class AnimalFarm implements ArrayAccess ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class AnimalFarm implements ArrayAccess ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class AnimalFarm implements ArrayAccess ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class AnimalFarm implements ArrayAccess ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -135,7 +168,7 @@ class AnimalFarm implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 a06860c019..e0dc3eedde 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ApiResponse implements ArrayAccess +class ApiResponse implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -69,11 +69,21 @@ class ApiResponse implements ArrayAccess 'message' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -89,7 +99,6 @@ class ApiResponse implements ArrayAccess 'message' => 'message' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -100,7 +109,6 @@ class ApiResponse implements ArrayAccess 'message' => 'setMessage' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -111,21 +119,46 @@ class ApiResponse implements ArrayAccess 'message' => 'getMessage' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -148,7 +181,7 @@ class ApiResponse implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 32d2f7a10f..da549dea22 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ArrayOfArrayOfNumberOnly implements ArrayAccess +class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess 'array_array_number' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess 'array_array_number' => 'ArrayArrayNumber' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess 'array_array_number' => 'setArrayArrayNumber' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess 'array_array_number' => 'getArrayArrayNumber' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -136,7 +169,7 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 8c452054d8..2c2c8d2565 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayOfNumberOnly.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ArrayOfNumberOnly implements ArrayAccess +class ArrayOfNumberOnly implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class ArrayOfNumberOnly implements ArrayAccess 'array_number' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class ArrayOfNumberOnly implements ArrayAccess 'array_number' => 'ArrayNumber' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class ArrayOfNumberOnly implements ArrayAccess 'array_number' => 'setArrayNumber' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class ArrayOfNumberOnly implements ArrayAccess 'array_number' => 'getArrayNumber' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -136,7 +169,7 @@ class ArrayOfNumberOnly implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 3e46cf7a94..786b4fe0ba 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ArrayTest implements ArrayAccess +class ArrayTest implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -69,11 +69,21 @@ class ArrayTest implements ArrayAccess 'array_array_of_model' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -89,7 +99,6 @@ class ArrayTest implements ArrayAccess 'array_array_of_model' => 'array_array_of_model' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -100,7 +109,6 @@ class ArrayTest implements ArrayAccess 'array_array_of_model' => 'setArrayArrayOfModel' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -111,21 +119,46 @@ class ArrayTest implements ArrayAccess 'array_array_of_model' => 'getArrayArrayOfModel' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -148,7 +181,7 @@ class ArrayTest implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 34eac1fa1a..1d28f1321d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Capitalization.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Capitalization implements ArrayAccess +class Capitalization implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -75,11 +75,21 @@ class Capitalization implements ArrayAccess 'att_name' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -98,7 +108,6 @@ class Capitalization implements ArrayAccess 'att_name' => 'ATT_NAME' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -112,7 +121,6 @@ class Capitalization implements ArrayAccess 'att_name' => 'setAttName' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -126,21 +134,46 @@ class Capitalization implements ArrayAccess 'att_name' => 'getAttName' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -166,7 +199,7 @@ class Capitalization implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 ba8afa45d6..2c24b7e089 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Cat extends Animal implements ArrayAccess +class Cat extends Animal implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class Cat extends Animal implements ArrayAccess 'declawed' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes + parent::swaggerTypes(); } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats + parent::swaggerFormats(); @@ -83,7 +93,6 @@ class Cat extends Animal implements ArrayAccess 'declawed' => 'declawed' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class Cat extends Animal implements ArrayAccess 'declawed' => 'setDeclawed' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class Cat extends Animal implements ArrayAccess 'declawed' => 'getDeclawed' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return parent::attributeMap() + self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return parent::setters() + self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return parent::getters() + self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -138,7 +171,7 @@ class Cat extends Animal implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 0bc8e6d37e..00b3126cac 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Category implements ArrayAccess +class Category implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class Category implements ArrayAccess 'name' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class Category implements ArrayAccess 'name' => 'name' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class Category implements ArrayAccess 'name' => 'setName' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class Category implements ArrayAccess 'name' => 'getName' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -142,7 +175,7 @@ class Category implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 c7c1abae7a..a8c070a4aa 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ClassModel.php @@ -40,7 +40,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ClassModel implements ArrayAccess +class ClassModel implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -66,11 +66,21 @@ class ClassModel implements ArrayAccess '_class' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -84,7 +94,6 @@ class ClassModel implements ArrayAccess '_class' => '_class' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -93,7 +102,6 @@ class ClassModel implements ArrayAccess '_class' => 'setClass' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -102,21 +110,46 @@ class ClassModel implements ArrayAccess '_class' => 'getClass' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -137,7 +170,7 @@ class ClassModel implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 5010312375..7efb7fbd05 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Client.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Client implements ArrayAccess +class Client implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class Client implements ArrayAccess 'client' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class Client implements ArrayAccess 'client' => 'client' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class Client implements ArrayAccess 'client' => 'setClient' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class Client implements ArrayAccess 'client' => 'getClient' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -136,7 +169,7 @@ class Client implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 54ecab69e8..bdde3f6228 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Dog extends Animal implements ArrayAccess +class Dog extends Animal implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class Dog extends Animal implements ArrayAccess 'breed' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes + parent::swaggerTypes(); } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats + parent::swaggerFormats(); @@ -83,7 +93,6 @@ class Dog extends Animal implements ArrayAccess 'breed' => 'breed' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class Dog extends Animal implements ArrayAccess 'breed' => 'setBreed' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class Dog extends Animal implements ArrayAccess 'breed' => 'getBreed' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return parent::attributeMap() + self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return parent::setters() + self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return parent::getters() + self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -138,7 +171,7 @@ class Dog extends Animal implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 f9f39261a8..00910f339f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumArrays.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class EnumArrays implements ArrayAccess +class EnumArrays implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class EnumArrays implements ArrayAccess 'array_enum' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class EnumArrays implements ArrayAccess 'array_enum' => 'array_enum' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class EnumArrays implements ArrayAccess 'array_enum' => 'setArrayEnum' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class EnumArrays implements ArrayAccess 'array_enum' => 'getArrayEnum' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + const JUST_SYMBOL_GREATER_THAN_OR_EQUAL_TO = '>='; const JUST_SYMBOL_DOLLAR = '$'; const ARRAY_ENUM_FISH = 'fish'; @@ -170,7 +203,7 @@ class EnumArrays implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 64ef5b87a1..c05423901b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class EnumTest implements ArrayAccess +class EnumTest implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -71,11 +71,21 @@ class EnumTest implements ArrayAccess 'outer_enum' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -92,7 +102,6 @@ class EnumTest implements ArrayAccess 'outer_enum' => 'outerEnum' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -104,7 +113,6 @@ class EnumTest implements ArrayAccess 'outer_enum' => 'setOuterEnum' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -116,21 +124,46 @@ class EnumTest implements ArrayAccess 'outer_enum' => 'getOuterEnum' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + const ENUM_STRING_UPPER = 'UPPER'; const ENUM_STRING_LOWER = 'lower'; const ENUM_STRING_EMPTY = ''; @@ -198,7 +231,7 @@ class EnumTest implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 77c6b2e3ec..4ddb24ba86 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class FormatTest implements ArrayAccess +class FormatTest implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -89,11 +89,21 @@ class FormatTest implements ArrayAccess 'password' => 'password' ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -119,7 +129,6 @@ class FormatTest implements ArrayAccess 'password' => 'password' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -140,7 +149,6 @@ class FormatTest implements ArrayAccess 'password' => 'setPassword' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -161,21 +169,46 @@ class FormatTest implements ArrayAccess 'password' => 'getPassword' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -208,7 +241,7 @@ class FormatTest implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 98346593a1..954a49683e 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/HasOnlyReadOnly.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class HasOnlyReadOnly implements ArrayAccess +class HasOnlyReadOnly implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class HasOnlyReadOnly implements ArrayAccess 'foo' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class HasOnlyReadOnly implements ArrayAccess 'foo' => 'foo' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class HasOnlyReadOnly implements ArrayAccess 'foo' => 'setFoo' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class HasOnlyReadOnly implements ArrayAccess 'foo' => 'getFoo' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -142,7 +175,7 @@ class HasOnlyReadOnly implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 327e9afc83..c821ad47d4 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MapTest.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class MapTest implements ArrayAccess +class MapTest implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class MapTest implements ArrayAccess 'map_of_enum_string' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class MapTest implements ArrayAccess 'map_of_enum_string' => 'map_of_enum_string' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class MapTest implements ArrayAccess 'map_of_enum_string' => 'setMapOfEnumString' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class MapTest implements ArrayAccess 'map_of_enum_string' => 'getMapOfEnumString' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + const MAP_OF_ENUM_STRING_UPPER = 'UPPER'; const MAP_OF_ENUM_STRING_LOWER = 'lower'; @@ -156,7 +189,7 @@ class MapTest implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 658ea82bb2..3effed2eea 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess +class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -69,11 +69,21 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess 'map' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -89,7 +99,6 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess 'map' => 'map' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -100,7 +109,6 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess 'map' => 'setMap' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -111,21 +119,46 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess 'map' => 'getMap' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -148,7 +181,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 aebd5b32c1..5b8f392645 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php @@ -40,7 +40,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Model200Response implements ArrayAccess +class Model200Response implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -68,11 +68,21 @@ class Model200Response implements ArrayAccess 'class' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -87,7 +97,6 @@ class Model200Response implements ArrayAccess 'class' => 'class' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -97,7 +106,6 @@ class Model200Response implements ArrayAccess 'class' => 'setClass' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -107,21 +115,46 @@ class Model200Response implements ArrayAccess 'class' => 'getClass' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -143,7 +176,7 @@ class Model200Response implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelInterface.php new file mode 100644 index 0000000000..29a20d70fb --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelInterface.php @@ -0,0 +1,96 @@ + null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class ModelList implements ArrayAccess '_123_list' => '123-list' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class ModelList implements ArrayAccess '_123_list' => 'set123List' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class ModelList implements ArrayAccess '_123_list' => 'get123List' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -136,7 +169,7 @@ class ModelList implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 dd2dd898af..32047e3098 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php @@ -40,7 +40,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ModelReturn implements ArrayAccess +class ModelReturn implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -66,11 +66,21 @@ class ModelReturn implements ArrayAccess 'return' => 'int32' ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -84,7 +94,6 @@ class ModelReturn implements ArrayAccess 'return' => 'return' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -93,7 +102,6 @@ class ModelReturn implements ArrayAccess 'return' => 'setReturn' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -102,21 +110,46 @@ class ModelReturn implements ArrayAccess 'return' => 'getReturn' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -137,7 +170,7 @@ class ModelReturn implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 143a0aa405..1e01e3867b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php @@ -40,7 +40,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Name implements ArrayAccess +class Name implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -72,11 +72,21 @@ class Name implements ArrayAccess '_123_number' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -93,7 +103,6 @@ class Name implements ArrayAccess '_123_number' => '123Number' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -105,7 +114,6 @@ class Name implements ArrayAccess '_123_number' => 'set123Number' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -117,21 +125,46 @@ class Name implements ArrayAccess '_123_number' => 'get123Number' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -155,7 +188,7 @@ class Name implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 16eb370bdc..10af696bad 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/NumberOnly.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class NumberOnly implements ArrayAccess +class NumberOnly implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class NumberOnly implements ArrayAccess 'just_number' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class NumberOnly implements ArrayAccess 'just_number' => 'JustNumber' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class NumberOnly implements ArrayAccess 'just_number' => 'setJustNumber' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class NumberOnly implements ArrayAccess 'just_number' => 'getJustNumber' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -136,7 +169,7 @@ class NumberOnly implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 7b238ace56..4c46934971 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Order implements ArrayAccess +class Order implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -75,11 +75,21 @@ class Order implements ArrayAccess 'complete' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -98,7 +108,6 @@ class Order implements ArrayAccess 'complete' => 'complete' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -112,7 +121,6 @@ class Order implements ArrayAccess 'complete' => 'setComplete' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -126,21 +134,46 @@ class Order implements ArrayAccess 'complete' => 'getComplete' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + const STATUS_PLACED = 'placed'; const STATUS_APPROVED = 'approved'; const STATUS_DELIVERED = 'delivered'; @@ -182,7 +215,7 @@ class Order implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php index efffc8ea0a..894a54cd62 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterBoolean.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class OuterBoolean implements ArrayAccess +class OuterBoolean implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class OuterBoolean implements ArrayAccess ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class OuterBoolean implements ArrayAccess ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class OuterBoolean implements ArrayAccess ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class OuterBoolean implements ArrayAccess ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -135,7 +168,7 @@ class OuterBoolean implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 57f63f7a37..a5cf7b9571 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterComposite.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class OuterComposite implements ArrayAccess +class OuterComposite implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -69,11 +69,21 @@ class OuterComposite implements ArrayAccess 'my_boolean' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -89,7 +99,6 @@ class OuterComposite implements ArrayAccess 'my_boolean' => 'my_boolean' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -100,7 +109,6 @@ class OuterComposite implements ArrayAccess 'my_boolean' => 'setMyBoolean' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -111,21 +119,46 @@ class OuterComposite implements ArrayAccess 'my_boolean' => 'getMyBoolean' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -148,7 +181,7 @@ class OuterComposite implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php index 8841a73395..a57d2da2bd 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterNumber.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class OuterNumber implements ArrayAccess +class OuterNumber implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class OuterNumber implements ArrayAccess ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class OuterNumber implements ArrayAccess ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class OuterNumber implements ArrayAccess ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class OuterNumber implements ArrayAccess ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -135,7 +168,7 @@ class OuterNumber implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php index 643ac61469..53ba2c2d4b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/OuterString.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class OuterString implements ArrayAccess +class OuterString implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class OuterString implements ArrayAccess ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class OuterString implements ArrayAccess ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class OuterString implements ArrayAccess ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class OuterString implements ArrayAccess ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -135,7 +168,7 @@ class OuterString implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 ca4fed946c..9333fe38e2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Pet implements ArrayAccess +class Pet implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -75,11 +75,21 @@ class Pet implements ArrayAccess 'status' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -98,7 +108,6 @@ class Pet implements ArrayAccess 'status' => 'status' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -112,7 +121,6 @@ class Pet implements ArrayAccess 'status' => 'setStatus' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -126,21 +134,46 @@ class Pet implements ArrayAccess 'status' => 'getStatus' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + const STATUS_AVAILABLE = 'available'; const STATUS_PENDING = 'pending'; const STATUS_SOLD = 'sold'; @@ -182,7 +215,7 @@ class Pet implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 99ab18453a..24418f2a73 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class ReadOnlyFirst implements ArrayAccess +class ReadOnlyFirst implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class ReadOnlyFirst implements ArrayAccess 'baz' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class ReadOnlyFirst implements ArrayAccess 'baz' => 'baz' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class ReadOnlyFirst implements ArrayAccess 'baz' => 'setBaz' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class ReadOnlyFirst implements ArrayAccess 'baz' => 'getBaz' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -142,7 +175,7 @@ class ReadOnlyFirst implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 ba51ced515..1f7dd3f781 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class SpecialModelName implements ArrayAccess +class SpecialModelName implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -65,11 +65,21 @@ class SpecialModelName implements ArrayAccess 'special_property_name' => 'int64' ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -83,7 +93,6 @@ class SpecialModelName implements ArrayAccess 'special_property_name' => '$special[property.name]' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -92,7 +101,6 @@ class SpecialModelName implements ArrayAccess 'special_property_name' => 'setSpecialPropertyName' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -101,21 +109,46 @@ class SpecialModelName implements ArrayAccess 'special_property_name' => 'getSpecialPropertyName' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -136,7 +169,7 @@ class SpecialModelName implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 d7d4ce07e4..88ade56dee 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class Tag implements ArrayAccess +class Tag implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -67,11 +67,21 @@ class Tag implements ArrayAccess 'name' => null ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -86,7 +96,6 @@ class Tag implements ArrayAccess 'name' => 'name' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -96,7 +105,6 @@ class Tag implements ArrayAccess 'name' => 'setName' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -106,21 +114,46 @@ class Tag implements ArrayAccess 'name' => 'getName' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -142,7 +175,7 @@ class Tag implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ 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 f678a67c1a..a280a091cb 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -39,7 +39,7 @@ use \ArrayAccess; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class User implements ArrayAccess +class User implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; @@ -79,11 +79,21 @@ class User implements ArrayAccess 'user_status' => 'int32' ]; + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerTypes() { return self::$swaggerTypes; } + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ public static function swaggerFormats() { return self::$swaggerFormats; @@ -104,7 +114,6 @@ class User implements ArrayAccess 'user_status' => 'userStatus' ]; - /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] @@ -120,7 +129,6 @@ class User implements ArrayAccess 'user_status' => 'setUserStatus' ]; - /** * Array of attributes to getter functions (for serialization of requests) * @var string[] @@ -136,21 +144,46 @@ class User implements ArrayAccess 'user_status' => 'getUserStatus' ]; + /** + * Array of attributes where the key is the local name, and the value is the original name + * + * @return array + */ public static function attributeMap() { return self::$attributeMap; } + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ public static function setters() { return self::$setters; } + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ public static function getters() { return self::$getters; } + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + @@ -178,7 +211,7 @@ class User implements ArrayAccess } /** - * show all the invalid properties with reasons. + * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */